Heim  >  Fragen und Antworten  >  Hauptteil

Server – Wie koexistieren IIS und Apache?

IIS belegt Port 80. Apache belegt auch Port 80. Nach dem Ändern des Apache-Ports auf 8080 kann nicht über IIS auf die PHP-Site zugegriffen werden, und es erscheint zu mühsam, PHP-Sites mit Apache zu veröffentlichen. Gibt es eine einfache Möglichkeit, PHP zu veröffentlichen?

大家讲道理大家讲道理2713 Tage vor727

Antworte allen(2)Ich werde antworten

  • 迷茫

    迷茫2017-05-16 16:59:39

    方法一

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

    方法二

    你把Apache的项目部署到IIS

    方法三

    Apache可以重定向,IIS部署8080,对应项目重定向到IIS
    

    Antwort
    0
  • 大家讲道理

    大家讲道理2017-05-16 16:59:39

    一、建议在IIS中配置PHP,现在也很好用

    二、执意安装Apache,可以再安装个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;
            }
        }
    

    Antwort
    0
  • StornierenAntwort