localhost subdomain not working!--SOLVED

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

localhost subdomain not working!--SOLVED

Postby wulftone » 17. October 2010 01:15

Hi all,

I realize this has been beaten to death, but I haven't found a solution yet... I can't get both my normal XAMPP localhost and a subdomain to work simultaneously. I can get either one to operate on its own, though... but it would be great to have BOTH. :P

Here's the pertinent files... any ideas?

httpd-vhosts.conf file
Code: Select all
<VirtualHost *:80>
ServerAdmin admin@localhost
DocumentRoot D:/xampp/htdocs
ServerName localhost
  <Directory "D:/xampp/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

<VirtualHost *:80>
ServerAdmin admin@localhost
DocumentRoot D:/Work/spotedu/donate
ServerName donate.localhost
  <Directory "D:/Work/spotedu/donate">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>


hosts file
Code: Select all
127.0.0.1 localhost
#::1 localhost
127.0.0.1 donate.localhost


Thanks!
-Trevor
Last edited by wulftone on 17. October 2010 05:29, edited 1 time in total.
wulftone
 
Posts: 2
Joined: 17. October 2010 01:08

Re: localhost subdomain not working!

Postby Dariusc123456 » 17. October 2010 03:21

MAke sure you restart apache after every vhost entry, make sure you check the error logs to see what it gives.
Dariusc123456
 
Posts: 22
Joined: 15. October 2010 15:18

Re: localhost subdomain not working!

Postby wulftone » 17. October 2010 05:28

Ah I fixed it. There was a VirtualHost overlap warning in the apache error.log. I added
Code: Select all
NameVirtualhost *:80
above the other lines in httpd-vhosts.conf and that solved the problem.
wulftone
 
Posts: 2
Joined: 17. October 2010 01:08


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 126 guests