wiki.conf
server { listen 80; server_name wiki.talkvip.cn; index index.html index.htm index.php; root /www/wiki/mediawiki-1.28.0; location ~ /.svn/ { deny all; } #rewrite ^/$ /?user=talkvip last; location / { rewrite ^/$ /index.php last; rewrite ^/(?!index.php|index.html|extensions|images|public|robots.txt)(.*)$ /index.php/$1 last; } location ~ .php { fastcgi_pass 127.0.0.1:9002; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~/uploads/.*.(php|php5)?$ { deny all; } location ~/public/.*.(php|php5)?$ { deny all; } location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*.(js|css)?$ { expires 8d; } access_log /www/logs/wiki.talkvip.cn.nginx.access.log main; }