全球主机交流论坛

标题: 这里能人多问个Nginx 设置虚拟目录并能执行php问题 [打印本页]

作者: yestop    时间: 2016-6-2 19:03
标题: 这里能人多问个Nginx 设置虚拟目录并能执行php问题
上军哥的网站搞了配置如下:

  1. location /test {
  2. alias /home/wwwroot/test/;
  3. index index.html index.php;
  4. }

  5. location ~ /test/.+\.php$ {
  6. rewrite /test/(.+\.php) /$1 break;
  7. fastcgi_pass  unix:/tmp/php-cgi.sock;
  8. fastcgi_index  index.php;
  9. fastcgi_param  SCRIPT_FILENAME  /home/wwwroot/test/$fastcgi_script_name;
  10. include  fastcgi_params;
  11. }
复制代码


然后并不可以用,解析html都行,然而php就是运行不了 提示 No input file specified.




欢迎光临 全球主机交流论坛 (https://sunk.eu.org/) Powered by Discuz! X3.4