Advertisement
aleuleu

happybep.com.conf

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