Advertisement
Guest User

Untitled

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