thinkphp的nginx配置
2016-07-26 10:12
585 查看
thinkphp的nginx配置
server { listen 80; server_name www.abc.com; #charset utf-8; access_log /var/www/www.abc.com/log/host.access.log; error_log /var/www/www.abc.com/log/error.log; # gzip off; root /var/www/www.abc.com/web; index index.php index.html index.htm; location / { if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; break; } } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 100d; } location ~ .*\.(js|css)?$ { expires 30d; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php(/|$) { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; set $fastcgi_script_name2 $fastcgi_script_name; if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$") { set $fastcgi_script_name2 $1; set $path_info $2; } fastcgi_param PATH_INFO $path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name2; fastcgi_param SCRIPT_NAME $fastcgi_script_name2; } }
相关文章推荐
- 发布前准备和nginx在Linux安装
- Nginx的平滑重启,升级和关闭
- 安装nginx
- nginx+uwsgi 部署django
- 为你的网站开启 gzip 压缩功能(nodejs、nginx)
- centos yum安装nginx 提示 No package nginx available问题解决方法
- nginx ab压力测试
- web性能优化——代理(nginx)
- nginx配置文件(nginx.conf)配置详解
- Nginx---404页面跳转
- [Nginx]使用源码编译安装Nginx服务器
- nginx 404页面返回404的状态码
- Nginx 优化
- 你应该了解nginx的七个原因
- FasfDFS intall nginx with image filter
- CentOS搭建Nginx+Subversion环境(包括多个版本库的配置)
- 为什么Nginx的性能要比Apache高很多?
- ATS+NIGNX 验证缓存(二) --配置源站nginx 缓存时间
- Android中直播视频技术探究之---视频直播服务端环境搭建(Nginx+RTMP)
- 【技术晨读】Nginx连接池