nginx.conf绑定虚拟目录执行PHP
2015-11-21 09:44
543 查看
编辑server.conf文件
server{ listen 127.86.1.88:80; root /home/www/webbase/apitest.ipaotui.com/wwwroot/; index index.php; location /{ include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; if ($uri ~ \.php$){ fastcgi_pass unix:/tmp/php-cgi.sock; } } location /document { root /home/www/webbase/apitest.ipaotui.com/; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; if ($uri ~ \.php$){ fastcgi_pass unix:/tmp/php-cgi.sock; } } location /wendang { if (!-e $request_filename) { rewrite ^/([0-9a-zA-Z]+)/(.*)$ /document/$2 last; } } }
相关文章推荐
- Nginx日志分析脚本
- windows10打不开nginx应该怎么办?
- nginx负载均衡的5策略
- Nginx绑定多个域名
- Nginx配置服务器SSI
- Nginx服务器配置404页面
- nginx的操作指令
- MAC下安装与配置nginx
- Nginx执行php,显示“No input file specified. ”的处理方法
- nginx高并发优化
- Nginx学习(一)
- nginx前端负载,后端apache获取真实IP设置
- Nginx负载均衡配置
- 基于nginx+lua简单的灰度发布系统
- mac下 搭建 nginx mysql php运行环境
- 辛星nginx教程免费下载
- Nginx配置文件nginx.conf中文详解
- Nginx 配置PHP
- nginx负载 发向代理配置文件参考
- ubuntu下apt-get安装nginx后的升级