Swoole 绑定域名 80 端口 (Nginx 反向代理)

启动 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 

猜你喜欢

转载自www.cnblogs.com/ouchihui/p/13198574.html
今日推荐