Advertisement
fylh

Untitled

Jun 20th, 2011
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name wiki.site.com *.wiki.site.com;
  4.  
  5. location / {
  6. index index.php5;
  7. error_page 404 = @mediawiki;
  8. }
  9.  
  10. location @mediawiki {
  11. rewrite ^/([^?]*)(?:\?(.*))? /index.php5?title=$1&$2 last;
  12. }
  13.  
  14. charset utf-8;
  15.  
  16. #access_log logs/host.access.log main;
  17.  
  18. root /home/www/wiki;
  19.  
  20. client_max_body_size 5m;
  21. client_body_timeout 60;
  22.  
  23. location ~ \.php5$ {
  24. root /home/user/wiki;
  25. fastcgi_pass 127.0.0.1:9000;
  26. fastcgi_index index.php5;
  27. fastcgi_param SCRIPT_FILENAME /home/user/wiki$fastcgi_script_name;
  28. include fastcgi_params;
  29. }
  30.  
  31. location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
  32. expires max;
  33. log_not_found off;
  34. }
  35.  
  36. location = /_.gif {
  37. expires max;
  38. empty_gif;
  39. }
  40.  
  41. location /cache {
  42. deny all;
  43. }
  44.  
  45. location /dumps {
  46. root /home/user/wiki/local;
  47. autoindex on;
  48. }
  49.  
  50. #error_page 404 /index.php;
  51.  
  52. location ~ /\.ht {
  53. deny all;
  54. }
  55.  
  56. # redirect server error pages to the static page /50x.html
  57. #
  58. error_page 500 502 503 504 /50x.html;
  59. location = /50x.html {
  60. root html;
  61. }
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement