Advertisement
Guest User

Untitled

a guest
Dec 11th, 2012
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. server {
  2. # Change these settings to match your machine
  3. listen 80 default_server;
  4. server_name localhost;
  5.  
  6. # Everything below here doesn't need to be changed
  7. access_log /var/log/nginx/access.log;
  8. error_log /var/log/nginx/error.log;
  9.  
  10. root /var/www/newznab/www/;
  11. index index.html index.htm index.php;
  12.  
  13. location ~* \.(?:ico|css|js|gif|inc|txt|gz|xml|png|jpe?g) {
  14. expires max;
  15. add_header Pragma public;
  16. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  17. }
  18.  
  19. location / { try_files $uri $uri/ @rewrites; }
  20.  
  21. location @rewrites {
  22. rewrite ^/([^/\.]+)/([^/]+)/([^/]+)/? /index.php?page=$1&id=$2&subpage=$3 last;
  23. rewrite ^/([^/\.]+)/([^/]+)/?$ /index.php?page=$1&id=$2 last;
  24. rewrite ^/([^/\.]+)/?$ /index.php?page=$1 last;
  25. }
  26.  
  27. location /admin { }
  28. location /install { }
  29.  
  30. location ~ \.php$ {
  31. include /etc/nginx/fastcgi_params;
  32. fastcgi_pass 127.0.0.1:9000;
  33.  
  34. # The next two lines should go in your fastcgi_params
  35. fastcgi_index index.php;
  36. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement