Can't get Apache Virtual Domain to Work
Here are my settings:
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?
9 Replies
i.e i cant use /home and add its own dir there.
What are the permissions on /home and /home/fs?
-Chris
for the /home directory etc
The /home/httpd/htdocs is set-up by default.
Adam
> 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
Apache is careful with which (sub)directories you can put your documents in.
chmod 2755
chmod 755
AllowOverride None
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 -
If you get "this account is disabled" message, chances are that user has /sbin/nologin shell. Do a "usermod -s /bin/bash
For example, I might do something like this for a typical domain:
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.