Advertisement
Guest User

nginx config

a guest
Sep 16th, 2013
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. server {
  2. listen 80;
  3.  
  4. server_name pieterhordijk.com www.pieterhordijk.com;
  5. root /srv/www/www.pieterhordijk.com/public;
  6. access_log /var/log/nginx/pieterhordijk-access.log;
  7. error_log /var/log/nginx/pieterhordijk-error.log error;
  8.  
  9. location = /favicon.ico { log_not_found off; access_log off; }
  10. location = /robots.txt { access_log off; log_not_found off; }
  11. location ~ /\. { access_log off; log_not_found off; deny all; }
  12. location ~ ~$ { access_log off; log_not_found off; deny all; }
  13. location ~ /.ht { access_log off; log_not_found off; deny all; }
  14.  
  15. location ~* .(js|css|png|jpg|jpeg|gif|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ {
  16. add_header Pragma "public";
  17. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  18. access_log off;
  19. log_not_found off;
  20. expires 360d;
  21. }
  22.  
  23. location ~ ^/index.php($|/) {
  24. fastcgi_split_path_info ^(.+\.php)(.*)$;
  25. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  26. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  27. fastcgi_param PATH_INFO $fastcgi_path_info;
  28. fastcgi_pass 127.0.0.1:9000;
  29. include fastcgi_params;
  30. }
  31.  
  32. location / {
  33. index index.php;
  34. try_files $uri /index.php?$args;
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement