Server - How do IIS and Apache coexist?
大家讲道理
大家讲道理 2017-05-16 16:57:39
0
2
723

IIS occupies port 80. Apache also occupies port 80. After changing the apache port to 8080, the php site cannot be accessed through IIS. It feels too troublesome to publish php sites with apache. Is there any simple way to publish php?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
迷茫

Method 1

在IIS上配置PHP环境,直接把PHP项目部署到IIS,不用Apache

Method 2

你把Apache的项目部署到IIS

Method 3

Apache可以重定向,IIS部署8080,对应项目重定向到IIS
大家讲道理

1. It is recommended to configure PHP in IIS, it is also very easy to use now

2. If you insist on installing Apache, you can install nginx

Nginx  监听 80
IIS    监听 8080
Apache 监听 8081
    server {
        listen 80;
        server_name  $host;
        
        location / {
            proxy_pass http://127.0.0.1:8080;
            proxy_set_header Host $host;
        }
    }

    server {
        listen 80;
        server_name  www.abc.com abc.com php.abc.com;
        
        location / {
            proxy_pass http://127.0.0.1:8081;
            proxy_set_header Host $host;
        }
    }
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!