nginx环境thinkphp,500错误
<br />server {<br /> listen 80;<br /> server_name 此处网站域名;<br /> root /usr/local/www/web/go;<br /><br /> location / {<br /> root /usr/local/www/web/go;<br /> index index.php index.html index.htm;<br /> if (!-e $request_filename) {<br /> rewrite ^(.*)$ /index.php/$1 last;<br /> break;<br /> }<br /> <br /> error_page 500 502 503 504 /50x.html;<br /> location = /50x.html {<br /> root /usr/share/nginx/html;<br /> }<br /> <br /> # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000<br /> location ~ .php$ {<br /> root /usr/local/www/web/go;<br /> fastcgi_pass 127.0.0.1:9000;<br /> fastcgi_index index.php;<br /> #定义变量 $path_info ,用于存放pathinfo信息<br /> set $path_info "";<br /> #定义变量 $real_script_name,用于存放真实地址<br /> set $real_script_name $fastcgi_script_name;<br /> #如果地址与引号内的正则表达式匹配<br /> if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {<br /> #将文件地址赋值给变量 $real_script_name<br /> set $real_script_name $1;<br /> #将文件地址后的参数赋值给变量 $path_info<br /> set $path_info $2;<br /> }<br /> #配置fastcgi的一些参数<br /> fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;<br /> fastcgi_param SCRIPT_NAME $real_script_name;<br /> fastcgi_param PATH_INFO $path_info;<br /> #fastcgi_param SCRIPT_FILENAME /usr/local/www/web/go$fastcgi_script_name;<br /> include fastcgi_params;<br /> }<br /> <br /> }<br /> <br />}<br />
server {<br> listen 80;<br> server_name www.phpno.com;<br> root /home/www/www_phpno_com/admin_wwwroot;<br> access_log off;<br> error_page 404 /404.html;<br> location /404.html {<br> root /home/www/www_phpno_com/admin_wwwroot;<div class="clear"> </div>