Skip to content

Instantly share code, notes, and snippets.

@dan
Created January 30, 2011 22:19
Show Gist options
  • Save dan/803334 to your computer and use it in GitHub Desktop.
Save dan/803334 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name wiki.com;
root /sites/wiki;
location / {
index index.php5;
error_page 404 = @mediawiki;
}
location @mediawiki {
rewrite ^/([^?]*)(?:\?(.*))? /index.php5?title=$1&$2 last;
}
location ~ \.php5?$ {
include /opt/local/etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:8888;
fastcgi_index index.php5;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment