php - nginx如何配置子目录的fastcgi_pass?
大家讲道理
大家讲道理 2017-04-10 15:12:49
0
1
348
location /wordpress {
        alias          /usr/local/nginx-1.6.2/html/wordpress;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  /usr/local/nginx-1.6.2/html/wordpress$fastcgi_script_name;
        include        fastcgi_params;
    }

发现SCRIPT_FILENAME会包含,/wordpress,怎么才能去掉这个子目录?只传递后面的部分?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

全部回复(1)
巴扎黑

ss --unix --all | grep php
输出类似:
u_str LISTEN 0 128 /run/php-fpm/php-fpm.sock 30653 * 0
我在 nginx.conf 中的配置
fastcgi_pass unix:/run/php-fpm/php-fpm.sock

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板