Advertisement
Guest User

Untitled

a guest
Aug 24th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. server {
  2. listen 80;
  3.  
  4. server_name www.eakarhoi.com;
  5. rewrite ^(.*) http://eakarhoi.com$1 permanent;
  6. }
  7.  
  8. server {
  9. listen 80;
  10.  
  11. # access_log off;
  12. access_log /home/eakarhoi.com/logs/access.log;
  13. # error_log off;
  14. error_log /home/eakarhoi.com/logs/error.log;
  15.  
  16. root /home/eakarhoi.com/public_html;
  17. index index.php index.html index.htm;
  18. server_name eakarhoi.com;
  19.  
  20. # Custom configuration
  21. include /home/eakarhoi.com/public_html/*.conf;
  22.  
  23. location / {
  24. try_files $uri $uri/ /index.php?$args;
  25. }
  26.  
  27. location ~ \.php$ {
  28. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  29. include /etc/nginx/fastcgi_params;
  30. fastcgi_pass 127.0.0.1:9000;
  31. fastcgi_index index.php;
  32. fastcgi_connect_timeout 300;
  33. fastcgi_send_timeout 300;
  34. fastcgi_read_timeout 300;
  35. fastcgi_buffer_size 32k;
  36. fastcgi_buffers 8 16k;
  37. fastcgi_busy_buffers_size 32k;
  38. fastcgi_temp_file_write_size 32k;
  39. fastcgi_intercept_errors on;
  40. fastcgi_param SCRIPT_FILENAME /home/eakarhoi.com/public_html$fastcgi_script_name;
  41. }
  42.  
  43. location ~ /\. {
  44. deny all;
  45. }
  46.  
  47. location = /favicon.ico {
  48. log_not_found off;
  49. access_log off;
  50. }
  51.  
  52. location = /robots.txt {
  53. allow all;
  54. log_not_found off;
  55. access_log off;
  56. }
  57.  
  58. location ~* \.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso|eot|svg|ttf|woff)$ {
  59. gzip_static off;
  60. add_header Pragma public;
  61. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  62. access_log off;
  63. expires 30d;
  64. break;
  65. }
  66.  
  67. location ~* \.(txt|js|css)$ {
  68. add_header Pragma public;
  69. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  70. access_log off;
  71. expires 30d;
  72. break;
  73. }
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement