MJJ论坛

 找回密码
 注册
查看: 1543|回复: 0

这里能人多问个Nginx 设置虚拟目录并能执行php问题

[复制链接]
发表于 2016-6-2 19:03:10 | 显示全部楼层 |阅读模式
上军哥的网站搞了配置如下:

  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.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|MJJ论坛

Copyright MJJ论坛 © 2022 All Rights Reserved.

快速回复 返回顶部 返回列表