Swoole 繫結域名 80 埠 (Nginx 反向代理)
阿新 • • 發佈:2020-06-27
啟動 Swoole 的 http server,可以使用 IP + 埠 進行訪問
建立 Nginx 虛擬域名
vim swotp.liuguofeng.com.conf
server
{
listen 80;
server_name swotp.liuguofeng.com ;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/swoole_thinkphp.liuguofeng.com;
location / {
if (!-e $request_filename) {
proxy_pass http://127.0.0.1:8811;
}
}
}
重啟 Nginx,DNS 指向 IP