Advertisement
JDVU

Untitled

Aug 25th, 2014
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. server {
  2. server_name www.sevtracker.org;
  3. rewrite ^(.*) http://sevtracker.org$1 permanent;
  4. }
  5.  
  6. server {
  7. listen 80;
  8. server_name sevtracker.org;
  9. server_name_in_redirect off;
  10.  
  11. root /var/www/sevtracker.org/www/;
  12.  
  13. access_log /var/log/nginx/sevtracker.org.access.log;
  14. error_log /var/log/nginx/sevtracker.org.error.log;
  15.  
  16. proxy_send_timeout 600;
  17. proxy_read_timeout 600;
  18.  
  19. location ~ /\.ht {
  20. deny all;
  21. }
  22.  
  23. location ~ \.(.*sql|tpl|db|inc|log)$ {
  24. deny all;
  25. }
  26.  
  27. location = /favicon.ico {
  28. log_not_found off;
  29. access_log off;
  30. }
  31.  
  32. location = /robots.txt {
  33. allow all;
  34. log_not_found off;
  35. access_log off;
  36. }
  37.  
  38. location ~* \.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
  39. root /var/www/sevtracker.org/www;
  40. access_log off;
  41. expires 30d;
  42. add_header Cache-Control public;
  43. }
  44.  
  45. # Deny folder (Sec. lvl1)
  46. location ~ \/(cache|log|attach_mod|config|includes|language|triggers)\/ {
  47. deny all;
  48. }
  49.  
  50. location / {
  51. index index.php index.html;
  52.  
  53. if (!-f $request_filename){
  54. set $rule_1 1$rule_1;
  55. }
  56.  
  57. if (!-d $request_filename){
  58. set $rule_1 2$rule_1;
  59. }
  60.  
  61. rewrite ^/rss.xml /rss.php;
  62. }
  63.  
  64. location ~ \.php$ {
  65. include fastcgi_params;
  66. try_files $fastcgi_script_name =404;
  67.  
  68. fastcgi_pass unix:/var/run/php5-fpm.sock;
  69. fastcgi_index index.php;
  70. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  71. }
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement