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

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注