Advertisement
possebon

Untitled

Oct 26th, 2023
959
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.49 KB | None | 0 0
  1.  
  2. server {
  3.   listen       80 ;
  4.   listen       [::]:80;
  5.   listen *:443 ssl;
  6.   server_name api.marcotextil.com.br;
  7.   client_max_body_size 300M;
  8.  
  9.   access_log  /var/log/nginx/api.marcotextil.com.br/access.log  main;
  10.   error_log  /var/log/nginx/api.marcotextil.com.br/error.log;
  11.  
  12.   ssl on;
  13.   ssl_certificate /etc/letsencrypt/live/marcotextil.com.br/fullchain.pem; # managed by Certbot
  14.  ssl_certificate_key /etc/letsencrypt/live/marcotextil.com.br/privkey.pem; # managed by Certbot
  15.  
  16.     #proxy_set_header Host $host;
  17.  # ssl_dhparam /etc/ssl/certs/dhparams.pem;
  18.  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  19.   ssl_session_timeout 1d;
  20.   ssl_session_cache shared:SSL:50m;
  21.   ssl_stapling on;
  22.   ssl_stapling_verify on;
  23.   ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
  24.  
  25.   ssl_prefer_server_ciphers on;
  26.  
  27.   #add_header X-Frame-Options DENY;
  28.  add_header X-Content-Type-Options nosniff;
  29.   add_header Strict-Transport-Security max-age=15768000;
  30.  
  31.  
  32.   location / {
  33.  # set Origin to blank to avoid Chrome problems with CORS
  34.                proxy_set_header Origin "" ;
  35.  
  36.                 # pass along some header variables with the public host name/port/and so on
  37.                proxy_set_header Host $host;
  38.                 proxy_set_header X-Forwarded-Host $host:$server_port;
  39.                 proxy_set_header X-Real-IP $remote_addr;
  40.                 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  41.                 proxy_set_header X-Forwarded-Proto $scheme;
  42.  
  43.                proxy_read_timeout 5m;
  44.                proxy_send_timeout 5m;
  45.                client_max_body_size 20M;
  46.                proxy_http_version 1.1;
  47.                proxy_set_header Upgrade $http_upgrade;
  48.                proxy_set_header Connection "upgrade";
  49.                proxy_pass http://10.171.161.101:8091;
  50.  
  51.     #proxy_redirect off;
  52.  
  53.   }
  54.  
  55. }              
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement