Virtual Host Problem

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Virtual Host Problem

Postby swanley » 03. June 2006 04:25

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
swanley
 
Posts: 2
Joined: 03. June 2006 04:10

Postby deepsurfer » 03. June 2006 12:11

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
chirio Deep
Wie sagte einst der MCP aus Tron auf dem Bildschirm zu schreiben Pflegte
" ... end of communication ... "
User avatar
deepsurfer
AF Moderator
 
Posts: 6440
Joined: 23. November 2004 10:44
Location: Cologne
Operating System: Win-XP / Win7 / Linux -Debian


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 116 guests