thinkphp在nginx环境下URL模式为1时配置文件
2013-10-30 14:53
274 查看
server{ listen 80; server_name yyy.xxx.com; index index.html index.htm index.php; root /data/www/xxx.com/yyy.xxx.com; if ($request_method !~ ^(GET|HEAD|POST)$ ) { return 405; } location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break; } } location ~ .*\.(php|php5)?$ { set $script $uri; set $path_info ""; if ($uri ~ "^(.+?\.php)(/.+)$") { set $script $1; set $path_info $2; } fastcgi_pass unix:/tmp/nginx.socket; #fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; fastcgi_param SCRIPT_FILENAME $document_root$script; fastcgi_param SCRIPT_NAME $script; fastcgi_param PATH_INFO $path_info; } access_log /data/logs/nginx/yyy.xxx.com_access.log main; error_log /data/logs/nginx/yyy.xxx.com_error.log; }
相关文章推荐
- nginx上搭建cacti
- Cacti在nginx上搭建步骤
- nginx 搭配 lua
- Nginx之虚拟目录-root与alias的区别
- 怎么让Nginx/apache支持shtml格式
- Nginx安装
- Nginx支持Nagios相关配置
- 日志分析工具Awstats实战之Nginx篇-分析结果静态化
- nginx php-fpm安装配置
- nginx+keepalived 负载均衡架构
- Nginx安装
- Nginx虚拟主机配置文件
- Nginx负载均衡+keepalived双机热备
- Nginx auth_basic+phpMyAdmin…
- 配置vim的Nginx配置文件语法高亮的…
- Nginx负载均衡配置文件
- nginx 作为Web缓存服务器
- nginx 重启
- Nginx做负载均衡报:nginx: [emerg] could not build the types_hash
- Nginx-防止负载过高模块sysguard