alcibiades
asked on
Help! Cannot get apache to direct to my virtual hosts! What gives?
I am setting up Apache on a new dedicated server. Using the same httpd.conf data as the last server, but it is not resolving my host names correctly.
I want to serve /home/public_html/host3/in dex.html
but when I go to http://www.myserver.com/~host3 , I get "page cannot be displayed"
in the error_log, it says " File does not exist: /var/www/html/~host3"
How do I get this to work?
from htttpd.conf:
<Directory />
Options All
AllowOverride All
</Directory>
UserDir public_html
NameVirtualHost (my.ip.address)
<VirtualHost (my.ip.address)>
DocumentRoot /home/host3/public_html
ServerName www.host3.com
ServerAlias www.host3.com host3.com
ServerAdmin webmaster@host3.com
</VirtualHost>
I want to serve /home/public_html/host3/in
but when I go to http://www.myserver.com/~host3 , I get "page cannot be displayed"
in the error_log, it says " File does not exist: /var/www/html/~host3"
How do I get this to work?
from htttpd.conf:
<Directory />
Options All
AllowOverride All
</Directory>
UserDir public_html
NameVirtualHost (my.ip.address)
<VirtualHost (my.ip.address)>
DocumentRoot /home/host3/public_html
ServerName www.host3.com
ServerAlias www.host3.com host3.com
ServerAdmin webmaster@host3.com
</VirtualHost>
Hi,
The reason your getting this error is because you are access you server as follows:
http://www.myserver.com/~host3
you have virtual hosting enabled so all you need to do to access that page is:
http://my.ip.address
replace my.ip.address with the one you used in virutal hosting.
The reason your getting this error is because you are access you server as follows:
http://www.myserver.com/~host3
you have virtual hosting enabled so all you need to do to access that page is:
http://my.ip.address
replace my.ip.address with the one you used in virutal hosting.
ASKER
I am trying to access www.myserver.com/~host3/index.html
The domain registration for www.host3.com has not been setup yet.
I don't understand Blaz'z comment about the DocumentRoot. His example looks the same as mine .
xDamox,
I have multiple virtual hosts. So http://my.ip.address is not going to resolve to host3 without additional information. www.myserver.com resolves to the master zone my.ip.address.com
The domain registration for www.host3.com has not been setup yet.
I don't understand Blaz'z comment about the DocumentRoot. His example looks the same as mine .
xDamox,
I have multiple virtual hosts. So http://my.ip.address is not going to resolve to host3 without additional information. www.myserver.com resolves to the master zone my.ip.address.com
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
What you say makes me wonder if mod_userdir is not enabled. I thought it was. It is selected under Webadmin. I am going to check out your suggestions and see what I can learn.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Also your DocumentRoot in host3 virtual host is wrong
DocumentRoot /home/host3/public_html