server
{
listen 80;
#listen [::]:80;
server_name
xjoker.us www.xjoker.us;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/
xjoker.us;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$1 last;
}
#include typecho.conf;
#error_page 404 /404.html;
location ~ .*\.php(\/.*)*$
{
set $path_info "";
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
#comment try_files $uri =404; to enable pathinfo
#try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
include pathinfo.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log /home/wwwlogs/xjoker.us.log access;
}