| Author |
Message |
Crisis
Joined: 14 Jan 2004
Posts: 40
|
| Posted: Fri Jan 23, 2004 11:04 am Post subject: Can't get Apache Virtual Domain to Work |
|
|
Well I think I'm close, but I have 2 domains that I am trying to get to work with apache on my linode. The first domain works fine, but the second domain is getting 403 Forbidden errors. I have tried chown to apache and chmod all seems fine in that area, path exists and has an index.html file etc.
Here are my settings:
Code:
NameVirtualHost 64.5.53.200
<VirtualHost 64.5.53.200>
ServerName garzsbarg.com
ServerAlias *.garzsbarg.com garzsbarg.com
ServerPath /home/httpd
DocumentRoot /home/httpd/htdocs
</VirtualHost>
<VirtualHost 64.5.53.200>
ServerName firestormers.com
ServerAlias *.firestormers.com firestormers.com
ServerPath /home/fs
DocumentRoot /home/fs/htdocs
</VirtualHost>
Anyone have any ideas? |
|
| Back to top |
|
Crisis
Joined: 14 Jan 2004
Posts: 40
|
| Posted: Fri Jan 23, 2004 11:26 am Post subject: |
|
|
Update, it seems I can only get it to work if it is a path somewhere past /home/httpd/htdocs
i.e i cant use /home and add its own dir there. |
|
| Back to top |
|
caker
Joined: 15 Apr 2003
Posts: 2392
Location: Galloway, NJ
|
| Posted: Fri Jan 23, 2004 11:35 am Post subject: |
|
|
For what you're trying to do, /home should be set world rx, or at least rx with the user Apache runs as.
What are the permissions on /home and /home/fs?
-Chris |
|
| Back to top |
|
adamgent
Joined: 23 Jun 2003
Posts: 261
|
| Posted: Fri Jan 23, 2004 12:48 pm Post subject: |
|
|
Also have you set-up the Directory settings in the httpd.conf file
for the /home directory etc
The /home/httpd/htdocs is set-up by default.
Adam |
|
| Back to top |
|
gmt
Joined: 20 Jul 2003
Posts: 96
Location: Tropical Queensland, Australia
|
| Posted: Sat Jan 24, 2004 10:30 am Post subject: |
|
|
Quote:
Update, it seems I can only get it to work if it is a path somewhere past /home/httpd/htdocs
i.e i cant use /home and add its own dir there.
You need to add an additional <directory> section with the path.
Apache is careful with which (sub)directories you can put your documents in. |
|
| Back to top |
|
You_Wish
Joined: 02 Nov 2003
Posts: 58
|
| Posted: Tue Feb 17, 2004 9:48 am Post subject: these codes got things going for me |
|
|
chmod go+x
chmod 2755
chmod 755 |
|
| Back to top |
|
fajar
Joined: 23 Jul 2004
Posts: 14
|
| Posted: Fri Jul 23, 2004 4:58 pm Post subject: |
|
|
Check your httpd.conf and make sure there's a section like
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
This will allow apache to use any directory as it's DocumentRoot, By default it's there.
Next, make sure that the directory you're using is accessible by httpd user.
You could su - <httpd_user> and go that directory to make sure it's readable.
If you get "this account is disabled" message, chances are that user has /sbin/nologin shell. Do a "usermod -s /bin/bash <httpd_user>" first. |
|
| Back to top |
|
Ciaran
Joined: 13 Feb 2004
Posts: 140
Location: England, UK
|
| Posted: Wed Jul 28, 2004 5:00 am Post subject: |
|
|
What I normally do is nest the <Directory> parts inside the <VirtualHost> parts, which is slightly more secure than doing it in the main part of httpd.conf.
For example, I might do something like this for a typical domain:
Code: NameVirtualHost 12.34.56.78:80
<VirtualHost 12.34.56.78:80>
ServerName some.domain.com
DocumentRoot /home/someuser/public_html
User someuser
Group someuser
ErrorLog /home/someuser/logs/error_log
CustomLog /home/someuser/logs/access_log combined
<Directory "/home/someuser/public_html">
Options -Indexes ExecCGI
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Hope this helps. :) |
|
| Back to top |
|
Crisis
Joined: 14 Jan 2004
Posts: 40
|
| Posted: Wed Jul 28, 2004 2:19 pm Post subject: |
|
|
| Sorry hehe got this fixed a long time ago ;) |
|
| Back to top |
|
Ciaran
Joined: 13 Feb 2004
Posts: 140
Location: England, UK
|
| Posted: Wed Jul 28, 2004 3:38 pm Post subject: |
|
|
| Ooo, I didn't notice the thread date properly. The month began with J and the year was 2004, so my brain read it as July. :D Anyway, you (or someone else) might find that layout helpful anyway. :) |
|
| Back to top |
|
| |