Advertisement
Guest User

Untitled

a guest
Dec 20th, 2011
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name example.com;
  4. root /var/www/example.com;
  5.  
  6. autoindex on;
  7.  
  8. index index.html index.php;
  9.  
  10.  
  11. client_max_body_size 50m;
  12. client_body_buffer_size 1024k;
  13. client_header_buffer_size 2k;
  14.  
  15. include php.conf;
  16.  
  17. # if you don't like seeing all the errors for missing favicon.ico in root
  18. location = /favicon.ico { access_log off; log_not_found off; }
  19.  
  20. # if you don't like seeing errors for a missing robots.txt in root
  21. location = /robots.txt { access_log off; log_not_found off; }
  22.  
  23.  
  24. location ~ /system/.* {
  25. deny all;
  26. }
  27.  
  28. location ~ /application/.* {
  29. deny all;
  30. }
  31.  
  32. location ~ ^/(dres|js|css|art)/ {
  33. access_log off;
  34. expires 7d;
  35. add_header Cache-Control public;
  36. try_files $uri $uri/ /index.php?$args;
  37. }
  38.  
  39. # Deny access to .htaccess files,
  40. # git & svn repositories, etc
  41. location ~ /(\.ht|\.git|\.svn) {
  42. deny all;
  43. }
  44.  
  45. location / {
  46. try_files $uri $uri/ /index.php?$args;
  47. }
  48.  
  49. location /site/ {
  50. try_files $uri $uri/ /site/index.php?$args;
  51. }
  52.  
  53.  
  54.  
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement