I am trying to emulate some Google Apps app installation functionality and in order to effectively debug it, I need it running on my local Windows 7 machine (using XAMPP).

I am behind a router and I've forwarded port 80 to my local IP. When I visit my real IP in the browser I can browse the XAMPP htdocs folder, but when I visit the domain I also browse the htdocs folder. Whereas I need to browse a specific subfolder when I visit the domain.

I've played a bit with httpd-vhosts.conf and here's what I got right now:

<VirtualHost mydomain.info>
    ServerAdmin [email protected]
    DocumentRoot "C:/xampp/htdocs/mydomain/subfolder"
    ServerName mydomain.info
    ServerAlias mydomain.info
    ErrorLog "logs/mydomain.info-error.log"
    CustomLog "logs/mydomain.info-access.log" combined

<VirtualHost localhost>
    ServerAdmin [email protected]
    DocumentRoot "C:/xampp/htdocs"
    ServerName localhost
    ServerAlias localhost
    ErrorLog "logs/dummy-host.localhost-error.log"
    CustomLog "logs/dummy-host.localhost-access.log" combined

As you can see, the first rule should have pointed all requests to mydomain.info to c:/xampp/htdocs/mydomain/subfolder, but instead it forwards them to just c:/xampp/htdocs.

Edit: I forgot to mention that I use a free DNS service, to whose nameservers I have pointed the domain. Then in that service's DNS management I've added a A record for the domain with value that looks like this (IP is an example): mydomain.info A and TXT record, required for Google Apps verification: mydomain.info TXT google-site-verification=7rgvD...... However, I doubt this is the problematic thing, since the domain resolves to my local machine as I have mentioned. It just doesn't resolve to the correct folder.

1 Answer 1


I think you'll find the problem is your VirtualHost declaration.


<VirtualHost mydomain.info>
<VirtualHost localhost>


<VirtualHost *:80>

You also don't need the ServerAlias lines unless you want to direct multiple domains to the same VirtualHost

More info: http://httpd.apache.org/docs/current/vhosts/name-based.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.