user1355300 user1355300 - 1 year ago 114
Apache Configuration Question

Adding virtual hosts for apache

I have IIS installed on my windows 7 which uses default port 80 and can be accessed at

. Now I have installed XAMPP as well and set the port 8081, so I can access it at

Now, I want to add virtual host only for the xampp so that I can access it via
instead of
. I dont want to make any changes in IIS address and want to keep its address same. For that purpose, I have added virtual host in my xampp/apache/conf/extra/httpd-conf file ie.,

NameVirtualHost *:8081
<VirtualHost *:8081>
DocumentRoot "C:/xampp/htdocs"
ServerName test
ServerAlias test

I have restarted the apache but still can not access the address
. Am I missing something or doing something wrong?

Answer Source

You have made XAMPP listen on Port 8081 rather thank 80 meaning that


needs to be


Without a port number in a URL you are just referring to the default port (I.e. port 80 for http)

Update: This is actually possible, however IIS and Apache (XAMPP) need to use different IP addresses and only bind to port 80 on there own IP address.

If you can't touch IIS then the only alternative would be to use a proxy script to show a site on IIS which would proxy to 8081.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download