# Virtual wiki.atyu30.com # Author atyu30 # Date: 2011/08/31 ## uname -r -m -o #2.6.18-194.el5 x86_64 GNU/Linux ## nginx -v #nginx: nginx version: nginx/1.1.1 # Change 2011/09/02 # MediaWiki-1.17.0 php-fpm Nginx Sphinx server { listen 443; #listen 80; server_name wiki.atyu30.com; charset utf-8; fastcgi_param HTTPS $fastcgi_https; location / { root /var/www/mediawiki-1.16.4; index index.php index.html index.htm; #将请求的不存在文件重写到index.php try_files $uri $uri/ /index.php; if (!-f $request_filename){ rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last; rewrite (.*) /index.php; } } location ~ \.php$ { root /var/www/mediawiki-1.16.4; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_intercept_errors on; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; client_max_body_size 20m; } ssl on; ssl_certificate /etc/pki/tls/certs/server.crt; ssl_certificate_key /etc/pki/tls/private/server.key; ssl_session_timeout 5m; ssl_protocols SSLv2 SSLv3 TLSv1; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; ssl_prefer_server_ciphers on; } map $scheme $fastcgi_https { default off; https on; }