server {listen 80;server_namewww.lor_think.work;root /www/thinkphp6/public;indexindex.php index.html index.htm;#charset koi8-r;access_log /dev/null;#access_log/var/log/nginx/nginx.localhost.access.logmain;error_log/var/log/nginx/nginx.localhost.error.logwarn;#error_page404/404.html;# redirect server error pages to the static page /50x.html#error_page 500 502 503 504/50x.html;location = /50x.html {root /usr/share/nginx/html;}# proxy the PHP scripts to Apache listening on 127.0.0.1:80##location ~ \.php$ {#proxy_pass http://127.0.0.1;#}# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000#location / {#访问路径的文件不存在则重写URL转交给ThinkPHP处理if (!-e $request_filename) { rewrite^/(.*)$/index.php/$1last; break;}}location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {expires 100d;}location ~ .*\.(js|css)?$ {expires 30d;}location ~ \.php(/|$) {fastcgi_pass php:9000;fastcgi_indexindex.php;includefastcgi.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;}# deny access to .htaccess files, if Apache's document root# concurs with nginx's one##location ~ /\.ht {#denyall;#}}