Advertisement
Guest User

Untitled

a guest
Aug 7th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. server {
  2. listen 443 ssl;
  3.  
  4. server_name REMOVED_REMOVED;
  5.  
  6.  
  7. include acme;
  8.  
  9.  
  10.  
  11.  
  12. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  13. ssl_certificate /etc/ssl/external/REMOVED_REMOVED/fullchain.pem;
  14. ssl_certificate_key /etc/ssl/external/REMOVED_REMOVED/privkey.pem;
  15.  
  16.  
  17.  
  18. access_log /var/log/nginx/REMOVED_REMOVED.log ;
  19.  
  20. #access_log off;
  21.  
  22. location / {
  23. root /var/www/REMOVED_REMOVED.new/apps/REMOVED_REMOVED/www;
  24. try_files $uri $uri/ /index.php?$query_string;
  25. index index.php index.html index.htm;
  26. }
  27.  
  28.  
  29.  
  30.  
  31. location ~ \.(jpg|jpeg|gif|png|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js|ico|swf|xml|mp3|html|svg)$
  32. {
  33. root /var/www/REMOVED_REMOVED.new/apps/REMOVED_REMOVED/www;
  34. etag on;
  35. }
  36.  
  37.  
  38. # redirect server error pages to the static page /50x.html
  39. error_page 500 502 503 504 /50x.html;
  40. location ~ \.php$ {
  41. try_files $uri $uri/ /index.php?$query_string;
  42. root /var/www/REMOVED_REMOVED.new/apps/REMOVED_REMOVED/www;
  43. include fastcgi_params;
  44. fastcgi_pass balancer;
  45. fastcgi_index index.php;
  46. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  47. add_header X-Upstream $upstream_addr;
  48. include /etc/nginx/geoip.conf;
  49. }
  50.  
  51. location /ajax/live/get/ {
  52. default_type application/json;
  53. add_header Charset utf-8;
  54.  
  55. fastcgi_cache_lock on;
  56. fastcgi_cache_lock_timeout 1s;
  57. fastcgi_cache_key "$args";
  58. fastcgi_cache MYAPP;
  59. fastcgi_cache_valid 200 3s;
  60. add_header X-FASTCGI-Cache $upstream_cache_status;
  61. fastcgi_ignore_headers Cache-Control Expires Set-Cookie ;
  62. fastcgi_hide_header "Set-Cookie";
  63. root /var/www/REMOVED_REMOVED.new/apps/REMOVED_REMOVED/www;
  64. include fastcgi_params;
  65. fastcgi_pass balancer;
  66. fastcgi_index index.php;
  67. fastcgi_param SCRIPT_FILENAME /var/www/REMOVED_REMOVED.new/apps/REMOVED_REMOVED/www/index.php;
  68. access_log /var/log/nginx/autorefresh.log qwa;
  69. access_log off;
  70. include /etc/nginx/geoip.conf;
  71.  
  72. }
  73.  
  74.  
  75. # deny access to .htaccess files, if Apache's document root
  76. location ~ /\.ht {
  77. deny all;
  78. }
  79.  
  80. }
  81.  
  82.  
  83.  
  84. server {
  85. listen 80;
  86.  
  87. server_name REMOVED_REMOVED;
  88.  
  89. include acme;
  90.  
  91.  
  92. #redirect all to httpS
  93. location / {
  94. return 301 https://$host$request_uri;
  95. }
  96. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement