国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

關(guān)于webman和 php-fpm 項目共存問題

hengge

服務(wù)器使用寶塔,有多個項目共存的話。如何使用webman監(jiān)聽80或者443端口呢?
也就是說,一個服務(wù)器可以運行多個webman項目,或者 webman和php-frm多個項目共存該如何配置呢?
可以提供下具體思路嘛?

2641 2 3
2個回答

nitron

子域名,或者根據(jù)不同路徑轉(zhuǎn)發(fā)到不同項目

  • 暫無評論
xiuwang

用nginx轉(zhuǎn)發(fā)下就行了。比如下面是example.com的請求轉(zhuǎn)發(fā)到webman 8787端口。

upstream webman {
    server 127.0.0.1:8787;
}

server {
  server_name example.com;
  listen 80;
  # webman的public目錄,這樣靜態(tài)文件都走nginx
  root /www/wwwroot/webman/public;

  index index.php index.html ;
  location / {
      proxy_set_header X-Real-IP $remote_addr;
      if (!-f $request_filename){
          proxy_pass http://webman;
      }
  }
}

比如你還有個項目域名是example2.com,webman用的8686端口,那再加一個配置。

upstream webman2 {
    server 127.0.0.1:8686;
}

server {
  server_name example2.com;
  listen 80;
  root /www/wwwroot/webman2/public;

  index index.php index.html ;
  location / {
      proxy_set_header X-Real-IP $remote_addr;
      if (!-f $request_filename){
          proxy_pass http://webman2;
      }
  }
}
  • 暫無評論
年代過于久遠,無法發(fā)表回答
??