Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.87 KB | None | 0 0
  1. server {
  2.         listen 8080;
  3.         server_name 127.0.0.1;
  4.          set client body size to 2M
  5.         client_max_body_size 2M;
  6.         location / {
  7.                auth_basic "Restricted";
  8.                auth_basic_user_file  /etc/nginx/auth/.htpasswd;
  9.                 proxy_pass http://127.0.0.1:9200;
  10.                 proxy_redirect off;
  11.                 proxy_set_header Host $host;
  12.                 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  13.         }
  14.  
  15.         location /_aliases {
  16.                auth_basic "Restricted";
  17.                auth_basic_user_file  /etc/nginx/auth/.htpasswd;
  18.                 proxy_pass http://127.0.0.1:9200;
  19.                 proxy_redirect off;
  20.                 proxy_set_header Host $host;
  21.                 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  22.         }
  23.  
  24.        include /etc/nginx/auth/*.conf;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement