mobilefish

Untitled

Oct 16th, 2020
420
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.25 KB | None | 0 0
  1.  
  2.     server {
  3.         #listen       80 default_server;
  4.         #listen       [::]:80 default_server;
  5.         listen        443 ssl;
  6.         server_name   somesite.com;
  7.  
  8.         #Certificate
  9.         ssl_certificate  /etc/nginx/ssl/some-cert.crt;
  10.  
  11.         #Private Key
  12.         ssl_certificate_key /etc/nginx/ssl/privateKey_app.key;
  13.  
  14.         root         /usr/share/nginx/html;
  15.  
  16.         # Load configuration files for the default server block.
  17.         include /etc/nginx/default.d/*.conf;
  18.  
  19.  
  20.  
  21.  
  22.         location / {
  23.  
  24.         }
  25.  
  26.  
  27.  
  28.         location /myapp/ {
  29.            proxy_pass  https://10.20.2.1:443/myapp/;
  30.            proxy_set_header Host $host;
  31.            proxy_set_header X-Real-IP $remote_addr;
  32.            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  33.  
  34.           # kill cache
  35.            sendfile off;
  36.            add_header Last-Modified $date_gmt;
  37.            add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
  38.            if_modified_since off;
  39.            expires off;
  40.            etag off;
  41.         }
  42.  
  43.  
  44.         error_page 404 /404.html;
  45.             location = /40x.html {
  46.         }
  47.  
  48.         error_page 500 502 503 504 /50x.html;
  49.             location = /50x.html {
  50.         }
  51.  
Add Comment
Please, Sign In to add comment