宇宙主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

欧基零壹微头条IP归属甄别会员请立即修改密码
查看: 1197|回复: 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|手机版|小黑屋|FastFib VPS论坛

GMT+8, 2024-9-20 16:30 , Processed in 0.060937 second(s), 7 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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