Advertisement
Guest User

Untitled

a guest
Jan 4th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.61 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name inngocmai.com www.inngocmai.com;
  4. rewrite ^(.*) https://inngocmai.com$1 permanent;
  5. }
  6. server {
  7. listen 443 ssl;
  8. server_name www.inngocmai.com;
  9.  
  10. access_log off;
  11. # access_log /home/inngocmai.com/logs/access.log;
  12. error_log off;
  13. # error_log /home/inngocmai.com/logs/error.log;
  14.  
  15. root /home/inngocmai.com/public_html;
  16. index index.php index.html index.htm;
  17. server_name inngocmai.com;
  18.  
  19. # SSL
  20. ssl_certificate /etc/letsencrypt/live/inngocmai.com/fullchain.pem;
  21. ssl_certificate_key /etc/letsencrypt/live/inngocmai.com/privkey.pem;
  22. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  23. ssl_prefer_server_ciphers on;
  24. ssl_ciphers AES256+EECDH:AES256+EDH:!aNULL;
  25.  
  26. location / {
  27. try_files $uri $uri/ /index.php?$args;
  28. }
  29.  
  30. # Custom configuration
  31. include /home/inngocmai.com/public_html/*.conf;
  32.  
  33. location ~ \.php$ {
  34. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  35. include /etc/nginx/fastcgi_params;
  36. fastcgi_pass 127.0.0.1:9000;
  37. fastcgi_index index.php;
  38. fastcgi_connect_timeout 1000;
  39. fastcgi_send_timeout 1000;
  40. fastcgi_read_timeout 1000;
  41. fastcgi_buffer_size 256k;
  42. fastcgi_buffers 4 256k;
  43. fastcgi_busy_buffers_size 256k;
  44. fastcgi_temp_file_write_size 256k;
  45. fastcgi_intercept_errors on;
  46. fastcgi_param SCRIPT_FILENAME /home/inngocmai.com/public_html$fastcgi_script_name;
  47. }
  48. location /nginx_status {
  49. stub_status on;
  50. access_log off;
  51. }
  52. location /php_status {
  53. fastcgi_pass 127.0.0.1:9000;
  54. fastcgi_index index.php;
  55. fastcgi_param SCRIPT_FILENAME /home/inngocmai.com/public_html$fastcgi_script_name;
  56. include /etc/nginx/fastcgi_params;
  57. }
  58. location ~ /\. {
  59. deny all;
  60. }
  61. location = /favicon.ico {
  62. log_not_found off;
  63. access_log off;
  64. }
  65. location = /robots.txt {
  66. allow all;
  67. log_not_found off;
  68. access_log off;
  69. }
  70. 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)$ {
  71. gzip_static off;
  72. add_header Pragma public;
  73. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  74. access_log off;
  75. expires 30d;
  76. break;
  77. }
  78.  
  79. location ~* \.(txt|js|css)$ {
  80. add_header Pragma public;
  81. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  82. access_log off;
  83. expires 30d;
  84. break;
  85. }
  86. }
  87.  
  88. Domain 2:
  89.  
  90.  
  91.  
  92. server {
  93. listen 80;
  94.  
  95. server_name www.invipcard.net;
  96. rewrite ^(.*) http://invipcard.net$1 permanent;
  97. }
  98. server {
  99. listen 80 default_server;
  100.  
  101. # access_log off;
  102. access_log /home/invipcard.net/logs/access.log;
  103. # error_log off;
  104. error_log /home/invipcard.net/logs/error.log;
  105.  
  106. root /home/invipcard.net/public_html;
  107. index index.php index.html index.htm;
  108. server_name invipcard.net;
  109.  
  110. location / {
  111. try_files $uri $uri/ /index.php?$args;
  112. }
  113.  
  114. # Custom configuration
  115. include /home/invipcard.net/public_html/*.conf;
  116.  
  117. location ~ \.php$ {
  118. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  119. include /etc/nginx/fastcgi_params;
  120. fastcgi_pass 127.0.0.1:9000;
  121. fastcgi_index index.php;
  122. fastcgi_connect_timeout 1000;
  123. fastcgi_send_timeout 1000;
  124. fastcgi_read_timeout 1000;
  125. fastcgi_buffer_size 256k;
  126. fastcgi_buffers 4 256k;
  127. fastcgi_busy_buffers_size 256k;
  128. fastcgi_temp_file_write_size 256k;
  129. fastcgi_intercept_errors on;
  130. fastcgi_param SCRIPT_FILENAME /home/invipcard.net/public_html$fastcgi_script_name;
  131. }
  132. location /nginx_status {
  133. stub_status on;
  134. access_log off;
  135. allow 127.0.0.1;
  136. deny all;
  137. }
  138. location /php_status {
  139. fastcgi_pass 127.0.0.1:9000;
  140. fastcgi_index index.php;
  141. fastcgi_param SCRIPT_FILENAME /home/invipcard.net/public_html$fastcgi_script_name;
  142. include /etc/nginx/fastcgi_params;
  143. allow 127.0.0.1;
  144. deny all;
  145. }
  146. location ~ /\. {
  147. deny all;
  148. }
  149. location = /favicon.ico {
  150. log_not_found off;
  151. access_log off;
  152. }
  153. location = /robots.txt {
  154. allow all;
  155. log_not_found off;
  156. access_log off;
  157. }
  158. 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)$ {
  159. gzip_static off;
  160. add_header Pragma public;
  161. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  162. access_log off;
  163. expires 30d;
  164. break;
  165. }
  166.  
  167. location ~* \.(txt|js|css)$ {
  168. add_header Pragma public;
  169. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  170. access_log off;
  171. expires 30d;
  172. break;
  173. }
  174. }
  175.  
  176. server {
  177. listen 2310;
  178.  
  179. access_log off;
  180. log_not_found off;
  181. error_log /home/invipcard.net/logs/nginx_error.log;
  182.  
  183. root /home/invipcard.net/private_html;
  184. index index.php index.html index.htm;
  185. server_name invipcard.net;
  186.  
  187. auth_basic "Restricted";
  188. auth_basic_user_file /home/invipcard.net/private_html/hocvps/.htpasswd;
  189.  
  190. location / {
  191. try_files $uri $uri/ /index.php;
  192. }
  193. location ~ \.php$ {
  194. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  195. include /etc/nginx/fastcgi_params;
  196. fastcgi_pass 127.0.0.1:9000;
  197. fastcgi_index index.php;
  198. fastcgi_connect_timeout 1000;
  199. fastcgi_send_timeout 1000;
  200. fastcgi_read_timeout 1000;
  201. fastcgi_buffer_size 256k;
  202. fastcgi_buffers 4 256k;
  203. fastcgi_busy_buffers_size 256k;
  204. fastcgi_temp_file_write_size 256k;
  205. fastcgi_intercept_errors on;
  206. fastcgi_param SCRIPT_FILENAME /home/invipcard.net/private_html$fastcgi_script_name;
  207. }
  208.  
  209. location ~ /\. {
  210. deny all;
  211. }
  212. }
  213.  
  214.  
  215.  
  216. domain 3:
  217.  
  218. server {
  219. listen 80;
  220.  
  221. server_name www.tembaohanh.net;
  222. rewrite ^(.*) http://tembaohanh.net$1 permanent;
  223. }
  224. server {
  225. listen 80;
  226.  
  227. # access_log off;
  228. access_log /home/tembaohanh.net/logs/access.log;
  229. # error_log off;
  230. error_log /home/tembaohanh.net/logs/error.log;
  231.  
  232. root /home/tembaohanh.net/public_html;
  233. index index.php index.html index.htm;
  234. server_name tembaohanh.net;
  235.  
  236. # Custom configuration
  237. include /home/tembaohanh.net/public_html/*.conf;
  238.  
  239. location / {
  240. try_files $uri $uri/ /index.php?$args;
  241. }
  242.  
  243. location ~ \.php$ {
  244. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  245. include /etc/nginx/fastcgi_params;
  246. fastcgi_pass 127.0.0.1:9000;
  247. fastcgi_index index.php;
  248. fastcgi_connect_timeout 300;
  249. fastcgi_send_timeout 300;
  250. fastcgi_read_timeout 300;
  251. fastcgi_buffer_size 32k;
  252. fastcgi_buffers 8 16k;
  253. fastcgi_busy_buffers_size 32k;
  254. fastcgi_temp_file_write_size 32k;
  255. fastcgi_intercept_errors on;
  256. fastcgi_param SCRIPT_FILENAME /home/tembaohanh.net/public_html$fastcgi_script_name;
  257. }
  258. location ~ /\. {
  259. deny all;
  260. }
  261. location = /favicon.ico {
  262. log_not_found off;
  263. access_log off;
  264. }
  265. location = /robots.txt {
  266. allow all;
  267. log_not_found off;
  268. access_log off;
  269. }
  270. 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)$ {
  271. gzip_static off;
  272. add_header Pragma public;
  273. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  274. access_log off;
  275. expires 30d;
  276. break;
  277. }
  278.  
  279. location ~* \.(txt|js|css)$ {
  280. add_header Pragma public;
  281. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  282. access_log off;
  283. expires 30d;
  284. break;
  285. }
  286. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement