Advertisement
Guest User

Untitled

a guest
Jan 24th, 2016
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. server {
  2. listen 80;
  3.  
  4. root /var/www/html;
  5. index index.php index.html index.htm;
  6.  
  7.  
  8. server_name tasteaholics.com www.tasteaholics.com;
  9.  
  10. location / {
  11. try_files $uri $uri/ /index.php?q=$uri&$args;
  12. }
  13.  
  14. location ~ \.php$ {
  15. try_files $uri =404;
  16. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  17. fastcgi_cache microcache;
  18. fastcgi_cache_key $scheme$host$request_uri$request_method;
  19. fastcgi_cache_valid 200 301 302 30s;
  20. fastcgi_cache_use_stale updating error timeout invalid_header http_500;
  21. fastcgi_pass_header Set-Cookie;
  22. fastcgi_pass_header Cookie;
  23. fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
  24. #fastcgi_pass 127.0.0.1:9000;
  25. fastcgi_pass unix:/var/run/php5-fpm.sock;
  26. fastcgi_index index.php;
  27. include fastcgi_params;
  28. }
  29.  
  30. location = /favicon.ico {
  31. log_not_found off;
  32. access_log off;
  33. }
  34.  
  35. location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {
  36. expires 1d;
  37. }
  38.  
  39. include /var/www/html/nginx.conf;
  40.  
  41. location = /nginx.conf { deny all; }
  42.  
  43. location = /robots.txt {
  44. allow all;
  45. log_not_found off;
  46. access_log off;
  47. }
  48.  
  49. location ~ /\. {
  50. deny all;
  51. }
  52.  
  53. location ~* /(?:uploads|files)/.*\.php$ {
  54. deny all;
  55. }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement