Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
9022 Lượt xem

 Using nginx url authentication, I was able to keep the IP behind the password, but IP:port and generally "IP:8069/web/database/manager#action=database_manager behind the password" is not following the authentication settings and is open to public. How to fix this?

upstream odoo {

server myIP:8069;

}

server {

listen 80 ;

server_name myIP;

auth_basic "Restricted";

auth_basic_user_file /path/.htpasswd;

 

location / {

 

proxy_pass http://odoo/;

proxy_http_version 1.1;

proxy_set_header Host $http_host;

proxy_set_header Upgrade $http_upgrade;

proxy_set_header Connection "upgrade";

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;

proxy_set_header X-Forward-Proto http;

proxy_set_header Authorization "Basic 0JR3BoaW5pXYzdiZy4NicTRKdmVzdDoxZS";

proxy_set_header X-Nginx-Proxy true;

proxy_redirect off;

}

}

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 20
3729
1
thg 8 24
1940
3
thg 5 24
22702
0
thg 10 23
978
0
thg 10 22
595