Advertisement
Guest User

Test.com

a guest
Jul 10th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.87 KB | None | 0 0
  1. server {
  2.     listen 443 ssl http2;
  3.     listen [::]:443 ssl http2;
  4.     server_name test.com www.test.com;
  5.  
  6.     root /var/www/html;
  7.     index index.html index.htm;
  8.    
  9.     include snippets/ssl-test.com.conf;
  10.     include snippets/ssl-params.conf;
  11.  
  12.     add_header Strict-Transport-Security "max-age=31536000;";
  13.  
  14.     location /js/ {
  15.         root /var/www/html;
  16.     }
  17.  
  18.     location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
  19.         expires 365d;
  20.     }
  21.  
  22.     if ($request_uri ~ /index\.html($|\?)) {
  23.         rewrite ^(/.*)\.html(\?.*)?$ $1$2 permanent;
  24.     }
  25.  
  26.     location / {
  27.         try_files $uri.html $uri/ $uri =404;
  28.     }
  29.  
  30.     location /Client {
  31.         proxy_pass https://DROPLETIP:8080;
  32.         proxy_buffers 16 32k;
  33.         proxy_buffer_size 64k;
  34.         proxy_busy_buffers_size 128k;
  35.         proxy_cache_bypass $http_pragma $http_authorization;
  36.         proxy_connect_timeout 59s;
  37.         proxy_hide_header X-Powered-By;
  38.         proxy_http_version 1.1;
  39.         proxy_ignore_headers Cache-Control Expires;
  40.         proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
  41.         proxy_no_cache $http_pragma $http_authorization;
  42.         proxy_pass_header Set-Cookie;
  43.         proxy_read_timeout 600;
  44.         proxy_redirect off;
  45.         proxy_send_timeout 600;
  46.         proxy_set_header Accept-Encoding '';
  47.         proxy_set_header Cookie $http_cookie;
  48.         proxy_set_header Host $host;
  49.         proxy_set_header Referer $http_referer;
  50.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  51.         proxy_set_header X-Forwarded-Host $host;
  52.         proxy_set_header X-Forwarded-Server $host;
  53.         proxy_set_header X-Real-IP $remote_addr;
  54.         proxy_set_header X-Forwarded-Proto $scheme;
  55.         proxy_temp_file_write_size 64k;
  56.         proxy_set_header X-Original-Request $request_uri;
  57.     }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement