server {
listen 80;
server_name www.phpd.cn *.phpd.cn;
access_log /var/log/nginx/phpd.access.log;
root /home/phpd/www;
rewrite ^/show-([0-9]+)-([0-9]+)\.html$ /index.php?action=show&id=$1&page=$2 last;
rewrite ^/category-([0-9]+)-([0-9]+)\.html$ /index.php?action=index&cid=$1&page=$2 last;
rewrite ^/archives-([0-9]+)-([0-9]+)\.html$ /index.php?action=index&setdate=$1&page=$2 last;
rewrite ^/(archives|search|reg|login|index|links)\.html$ /index.php?action=$1 last;
rewrite ^/(comments|tagslist|trackbacks|index)-([0-9]+)\.html$ /index.php?action=$1&page=$2 last;
location / {
index index.php index.html index.htm;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/phpd/www$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
}