Vhost in Apache only working locally?

Posted by Gasman on Super User See other posts from Super User or by Gasman
Published on 2012-04-12T15:31:06Z Indexed on 2012/04/12 17:34 UTC
Read the original article Hit count: 170

Filed under:

Ok, I have added lines like:

127.0.0.1   somedomain.com

Or some other domain that points to my routers IP, and is forwarded, but I get to the main site, but I want it to go to the subfolder I defined in my httpd-vhosts.conf:

NameVirtualHost  somedomain.com:80

<VirtualHost somedomain.com:80>
 DocumentRoot "D:/Apps/xampp/htdocs/somedomain"
 ServerName somedomain.com
 ServerAlias somedomain.com
</VirtualHost>

So, locally somedomain.com works, just remotely it goes to the root htdocs. So If I use a *:80 wildcard I works, but then everything points to the subfolder and all the other vhosts seem to get ignored.

Any Idea why this is?

© Super User or respective owner

Related posts about xampp