跳至內容
選單
此問題已被標幟
9568 瀏覽次數

 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;

}

}

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
8月 20
3869
1
8月 24
2248
3
5月 24
23063
0
10月 23
978
0
10月 22
595