Page 1 of 1

Virtual Host Problem

PostPosted: 03. June 2006 04:25
by swanley
Hello All;

I have an apache server running on a windows machine. I am trying to do virtual hosting (name based) so that I can have two sites on one IP. My domain and DNS host godaddy says it is ready on there end. I cannot get it to work though.

Here is my virtual host syntax:
NameVirtualHost 66.211.238.83

<VirtualHost 66.211.238.83>
ServerName www.stanswank.com
DocumentRoot "C:/Program Files/xampp/htdocs/sites/stanswank.com/site/web"
ErrorLog "C:/Program Files/xampp/htdocs/sites/stanswank.com/local-logs/error.log"
CustomLog "C:/Program Files/xampp/htdocs/sites/stanswank.com/local-logs/access.log" combined
</VirtualHost>

<VirtualHost 66.211.238.83>
ServerName www.swankcomputingsolutions.com
DocumentRoot "C:/Program Files/xampp/htdocs/sites/swankcomputingsolutions.com/site/web"
ErrorLog "C:/Program Files/xampp/htdocs/sites/swankcomputingsolutions.com/local-logs/error.log"
CustomLog "C:/Program Files/xampp/htdocs/sites/swankcomputingsolutions.com/local-logs/access.log" combined
</VirtualHost>




here is my windows/system32/drivers/etc/hosts file:

127.0.0.1 localhost
127.0.0.1 www.stanswank.com
127.0.0.1 www.swankcomputingsolutions.com


All I am getting is the directory structure as seen from the htdocs folder( this is where my sites are in sub of as seen above)

I hope someone can help!!!

PS I am going on vacation to FL. I will try to check back while gone, but please don't quit if you don't hear bac right away.

Thanks in advance

PostPosted: 03. June 2006 12:11
by deepsurfer
You have no <Directory> Definition for this VHOSTs, the Vhost known what you will, but the Vhost dont know what there doing with this
Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.stanswank.com
DocumentRoot "C:/Program Files/xampp/htdocs/sites/stanswank.com/site/web"
ErrorLog "C:/Program Files/xampp/htdocs/sites/stanswank.com/local-logs/error.log"
CustomLog "C:/Program Files/xampp/htdocs/sites/stanswank.com/local-logs/access.log" combined
<Directory "C:/Program Files/xampp/htdocs/sites/stanswank.com/site/web">
AllowOverride All
        Options IncludesNoExec
        Order allow,deny
        Allow from all
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName www.swankcomputingsolutions.com
DocumentRoot "C:/Program Files/xampp/htdocs/sites/swankcomputingsolutions.com/site/web"
ErrorLog "C:/Program Files/xampp/htdocs/sites/swankcomputingsolutions.com/local-logs/error.log"
CustomLog "C:/Program Files/xampp/htdocs/sites/swankcomputingsolutions.com/local-logs/access.log" combined
<Directory "C:/Program Files/xampp/htdocs/sites/swankcomputingsolutions.com/site/web">
AllowOverride All
        Options IncludesNoExec
        Order allow,deny
        Allow from all
</Directory>
</VirtualHost>


If you will that without any index File that the server display the Directory-Indexes so you musst add in Line
Options +Indexes IncludesNoExec