nginx虚拟目录配置(php-fpm+fastcgi)
2015-08-10 17:30
851 查看
</pre><p class="p1"><pre name="code" class="plain">server { listen 80; server_name www.test.net; index index.html index.htm index.php; root /www/www.test.net/public; access_log /www/access_log/test_log; location / { if (!-e $request_filename){ rewrite (.*) /index.php last;} } location /uploads { if (!-e $request_filename){ rewrite (.*) /uploads/index.php last;} } location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html)$ { access_log off; expires 30d; } location ~ .php$ { root /www/www.test.net/public; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_script_name; } location ~ /\.ht { deny all; } }
相关文章推荐
- nginx配置文件详解
- LNMP的Nginx启动脚本和配置文件
- linux centos6.5安装tengine(nginx)
- LNMP—Nginx的编译安装
- nginx + unicorn 配置
- Nginx配置文件详细说明
- windows配置nginx实现负载均衡集群
- linux 下搭建Nginx+php报错open_basedir restriction in effect. File(/var/www/html/index.php) is not within
- 如何收集 NGINX 指标(第二篇)
- 一台nginx服务器多域名配置 (转)
- LNMP编译安装(centos7+nginx1.9+mysql5.6+php5.5)
- lnmp环境安装(2)-nginx安装
- nginx安装
- N年前Nginx 负载均衡在金山逍遥网中的应用
- Nginx 笔记与总结(10)Nginx 与 PHP 整合
- 01_Nginx安装,nginx下部署项目,nginx.conf配置文件修改,相关文件配置
- 01_Nginx安装,nginx下部署项目,nginx.conf配置文件修改,相关文件配置
- nginx学习记录
- nginx - 性能优化,突破十万并发
- N年前Nginx负载均衡在新浪播客中的应用