当前位置: 首页 > 工具软件 > LaravelS > 使用案例 >

宝塔面板nginx配置laravelS

阎璞瑜
2023-12-01

配置伪静态  

location / {
    try_files $uri $uri/ @swoole;
}

nginx配置新增

 location @swoole {
        set $suffix "";

        if ($uri = /index.php) {
            set $suffix "/";
        }

        proxy_set_header Host $host;
        proxy_set_header SERVER_PORT $server_port;
        proxy_set_header REMOTE_ADDR $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        # IF https
        # proxy_set_header HTTPS "on";

        proxy_pass http://127.0.0.1:1215$suffix;
    }

 

 类似资料: