Advertisement
Guest User

NGINX Config

a guest
Dec 27th, 2020
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Generated by CubeCoders AMP for ADS
  2. server {
  3.     server_name mydomain.com;
  4.  
  5.     client_max_body_size 100M;
  6.     proxy_request_buffering off;
  7.     proxy_buffering off;
  8.     proxy_pass_request_body on;
  9.  
  10.     location /amp/ {
  11.         proxy_pass http://localhost:8080/;
  12.         proxy_set_header        Host $host;
  13.         proxy_set_header        X-Real-IP $remote_addr;
  14.         proxy_set_header        X-Forwarded-For $remote_addr;
  15.         proxy_set_header        Upgrade $http_upgrade;
  16.         proxy_set_header        Connection "Upgrade";
  17.         proxy_set_header        X-AMP-Scheme $scheme;
  18.         proxy_read_timeout      86400s;
  19.         proxy_send_timeout      86400s;
  20.         proxy_http_version      1.1;
  21.         proxy_redirect          off;
  22.         proxy_buffering         off;
  23.         client_max_body_size    10240M;
  24.         error_page 502 /amp/NotRunning.html;
  25.  
  26.         location = /amp/NotRunning.html {
  27.             root /opt/cubecoders/amp/shared/WebRoot;
  28.             internal;
  29.         }
  30.  
  31.         location /amp/shared/ {
  32.             alias /opt/cubecoders/amp/shared/WebRoot/;
  33.         }
  34.     }
  35.  
  36.     location /plan/ {
  37.        proxy_pass http://localhost:8804/;
  38.     }
  39.  
  40.     listen [::]:443 ssl http2 ipv6only=on; # managed by Certbot
  41.     listen 443 ssl http2; # managed by Certbot
  42.     ssl_certificate /etc/letsencrypt/live/mydomain.com/fullchain.pem; # managed by Certbot
  43.     ssl_certificate_key /etc/letsencrypt/live/mydomain.com/privkey.pem; # managed by Certbot
  44.     include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  45.     ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  46.  
  47. }
  48.  
  49. server {
  50.     if ($host = mydomain.com) {
  51.         return 301 https://$host$request_uri;
  52.     } # managed by Certbot
  53.  
  54.  
  55.     listen 80;
  56.     listen [::]:80;
  57.     server_name mydomain.com;
  58.     return 404; # managed by Certbot
  59.  
  60.  
  61. }
  62.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement