Advertisement
Guest User

Untitled

a guest
Apr 8th, 2020
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.42 KB | None | 0 0
  1. # Handle https connection
  2. server {
  3.     listen       443 ssl;
  4.     server_name  api.seamon.io;
  5.  
  6.     ssl_certificate          /etc/letsencrypt/live/api.seamon.io/fullchain.pem;
  7.     ssl_certificate_key      /etc/letsencrypt/live/api.seamon.io/privkey.pem;
  8.  
  9.     client_max_body_size 50M;
  10.     ssl_verify_client off;
  11.  
  12.     gzip on;
  13.     gzip_proxied any;
  14.     gzip_types
  15.       application/json;
  16.  
  17.     location /road {
  18.         alias /static_pages/road;
  19.     }
  20.  
  21.     location /sdk {
  22.         alias /static_pages/sdk;
  23.     }
  24.  
  25.     location /getapps {
  26.         alias /static_pages/getapps;
  27.     }
  28.  
  29.     location / {
  30.         proxy_set_header X-Forwarded-Host $host;
  31.         proxy_set_header X-Forwarded-Server $host;
  32.  
  33.         proxy_set_header X-Real-IP $remote_addr;
  34.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  35.  
  36.         proxy_pass http://seamonapi:1706;
  37.     }
  38. }
  39.  
  40. # seamon api docker service down simulation port,
  41. # usueful for checking proxy behavior when docker service is down.
  42. server {
  43.     listen       55555 ssl;
  44.     server_name  api.seamon.io;
  45.  
  46.     ssl_certificate          /etc/letsencrypt/live/api.seamon.io/fullchain.pem;
  47.     ssl_certificate_key      /etc/letsencrypt/live/api.seamon.io/privkey.pem;
  48.  
  49.     client_max_body_size 50M;
  50.     ssl_verify_client off;
  51.  
  52.     gzip on;
  53.     gzip_proxied any;
  54.     gzip_types
  55.       application/json;
  56.  
  57.     location / {
  58.         return 502;
  59.     }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement