简体   繁体   中英

Using IIS and Apache on same server

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>

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM