PDA

View Full Version : something wrong with virtual host setup



hvrossum
30th November 2005, 12:04 PM
I am trying to set up virtual hosting on my machine, I have edited the httpd.conf file but keep on getting just the Fedora welcome page.
What am i overlooking

This is how my virtual hosting section looks like

ServerName treehut:80

UseCanonicalName On

DocumentRoot "/var/www/html"


#<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

<VirtualHost partij.treehut.homeunix.com>
ServerAdmin email@at.nl
DocumentRoot /var/www/html/partij
ServerName partij.treehut.homeunix.com
ErrorLog logs/partij.log
CustomLog logs/partij.log common
DirectoryIndex index.php index.html index.htm
</VirtualHost>

pahoskins
30th November 2005, 12:58 PM
<VirtualHost *:80>
ServerAdmin email@at.nl
DocumentRoot /var/www/html/partij
ServerName partij.treehut.homeunix.com
ErrorLog logs/partij-ERROR.log
CustomLog logs/partij.log common
DirectoryIndex index.php index.html index.htm
</VirtualHost>

pembo13
30th November 2005, 05:07 PM
For such issues, the best way to troubleshoot is to check the logs for httpd.

hvrossum
30th November 2005, 09:56 PM
The tip of Pahoskins worked, thanks. But how should I do two virtual webservers?

pahoskins
1st December 2005, 09:52 AM
Assumed from the your url your using dyndns.org

Setup on dyndns.org

secondsitepartij.treehut.homeunix.com
Enable wildcards = true so you can use www.* etc

<VirtualHost *:80>
ServerAdmin email@at.nl
DocumentRoot /var/www/html/secondsite
ServerName www.secondsitepartij.treehut.homeunix.com
ErrorLog logs/sencond-partij-ERROR.log
CustomLog logs/second-partij.log common
DirectoryIndex index.php index.html index.htm
</VirtualHost>

Use ddclient, search on this forum for where to get it, to update dyndns when your IP changes

Cheers