0

I have a server running both Apache and IIS. IIS is using port 80 and every domain name hosted on the server using iis works fine. Now i also have apache running and is listen on port 8080. Is is possible that i have a domain www.example.com and it uses Apache, but i do not have to type www.example.com:8080 to get the site , but i go on www.example.com to get the site. I can host php on iis and all that but i want to use Apache for that website. I am currently this on httpd.conf

<VirtualHost *>
    DocumentRoot "${path}/data/localweb/example"
    ServerName www.example.com
    <Directory "${path}/data/localweb/example">
        Options FollowSymLinks Indexes
        AllowOverride All
        Order allow,deny
        Allow from all
        #Deny from all
        Require all granted
    </Directory>
    # Other directives here
</VirtualHost>
user2327579
  • 449
  • 9
  • 24

1 Answers1

1

If you have the ability to use multiple IP address oh the web server you could bind the IIS site to one on port 80 and the Apache site to port 80 on the second. If it's a VM you can just add another virtual network interface, if it's a physical server you can add a new network card.

If you only have one IP address you could setup ARR+ URL rewrite to use the IIS server to act as a reverse proxy to the apache site.

Dax
  • 116
  • 5
  • I had tried with multiple ips, but it did not work, i am using a windows hyper v hosting. I have tried with ARR + URL rewrite it should work , but i really wanted it to be with the multiple ips. When i listen with apache on port 80 it says process cannot access specified port. – user2327579 Apr 05 '16 at 09:53
  • Are you setting up the binding correctly on the web servers, specificaly are you assigning only one IP address? In apache this can be done in http.conf Listen Apache_IP_Address_Here:80 . In IIS you can set this in the GUI by clicking the website, followed by clicking binding, and chanign the IP address from * to a specific IP on the host. You can also look at "C:\Windows\System32\inetsrv\config\applicationHost.config" and search for to find the configuration. A binding that listens on all IP's looks like this – Dax Apr 05 '16 at 14:52