Guest User

Untitled

a guest
Jan 16th, 2017
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.26 KB | None | 0 0
  1. server {
  2. listen 80;
  3.  
  4. server_name www.nychanis.com;
  5. rewrite ^(.*) http://nychanis.com$1 permanent;
  6. }
  7. server {
  8. listen 80;
  9.  
  10. # access_log off;
  11. access_log /home/nychanis.com/logs/access.log;
  12. # error_log off;
  13. error_log /home/nychanis.com/logs/error.log;
  14.  
  15. root /home/nychanis.com/public_html;
  16. index index.php index.html index.htm;
  17. server_name nychanis.com;
  18.  
  19. location / {
  20. try_files $uri $uri/ /index.php?$args;
  21. }
  22.  
  23. # Custom configuration
  24. include /home/nychanis.com/public_html/*.conf;
  25.  
  26. location ~ \.php$ {
  27. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  28. include /etc/nginx/fastcgi_params;
  29. fastcgi_pass 127.0.0.1:9000;
  30. fastcgi_index index.php;
  31. fastcgi_connect_timeout 300;
  32. fastcgi_send_timeout 300;
  33. server_name nychanis.com;
  34.  
  35. location / {
  36. try_files $uri $uri/ /index.php?$args;
  37. }
  38.  
  39. # Custom configuration
  40. include /home/nychanis.com/public_html/*.conf;
  41.  
  42. location ~ \.php$ {
  43. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  44. include /etc/nginx/fastcgi_params;
  45. fastcgi_pass 127.0.0.1:9000;
  46. fastcgi_index index.php;
  47. fastcgi_connect_timeout 300;
  48. fastcgi_send_timeout 300;
  49. fastcgi_read_timeout 300;
  50. fastcgi_buffer_size 32k;
  51. fastcgi_buffers 8 16k;
  52. fastcgi_busy_buffers_size 32k;
  53. fastcgi_temp_file_write_size 32k;
  54. fastcgi_intercept_errors on;
  55. fastcgi_param SCRIPT_FILENAME /home/nychanis.com/public_html$fastcgi_script_name;
  56. }
  57. location ~ /\. {
  58. deny all;
  59. }
  60. location = /favicon.ico {
  61. log_not_found off;
  62. access_log off;
  63. }
  64. location = /robots.txt {
  65.  
  66. fastcgi_read_timeout 300;
  67. fastcgi_buffer_size 32k;
  68. fastcgi_buffers 8 16k;
  69. fastcgi_busy_buffers_size 32k;
  70. fastcgi_temp_file_write_size 32k;
  71. fastcgi_intercept_errors on;
  72. fastcgi_param SCRIPT_FILENAME /home/nychanis.com/public_html$fastcgi_script_name;
  73. }
  74. location ~ /\. {
  75. deny all;
  76. }
  77. location = /favicon.ico {
  78. log_not_found off;
  79. access_log off;
  80. }
  81. location = /robots.txt {
  82. allow all;
  83. log_not_found off;
  84. access_log off;
  85. }
  86. 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|d$
  87. gzip_static off;
  88. add_header Pragma public;
  89. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  90. access_log off;
  91. expires 30d;
  92. break;
  93. }
  94.  
  95. location ~* \.(txt|js|css)$ {
  96. add_header Pragma public;
  97. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  98.  
  99.  
  100. allow all;
  101. log_not_found off;
  102. access_log off;
  103. }
  104. 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|d$
  105. gzip_static off;
  106. add_header Pragma public;
  107. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  108. access_log off;
  109. expires 30d;
  110. break;
  111. }
  112.  
  113. location ~* \.(txt|js|css)$ {
  114. add_header Pragma public;
  115. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  116. access_log off;
  117. expires 30d;
  118. break;
  119. }
  120. }
Advertisement
Add Comment
Please, Sign In to add comment