Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker security #43

Open
matteoventuri7 opened this issue Jul 30, 2021 · 1 comment
Open

Docker security #43

matteoventuri7 opened this issue Jul 30, 2021 · 1 comment

Comments

@matteoventuri7
Copy link

Hi, i have deployed nginx-ui on Docker like documentation but i have a problem: if I try to access to nginx-ui through nginx proxy all is ok (basic auth ask me login) but if i go direct on port 8080 then i can access to nginx-ui bypassing nginx proxy.
So, this is a summary:
nginx.mysite.com -> asking login (OK!!!)
mysite.com:8080 -> i can access to nginx-ui without login.

Any helps?
NGINX config

server { 
 listen 80;
 server_name nginx.mysite.com; 
 return 301 https://$host$request_uri; 
} 
server {
    listen 443 ssl; 
    server_name nginx.mysite.com; 
    ssl_certificate /etc/letsencrypt/live/mysite.com/fullchain.pem; 
    ssl_certificate_key /etc/letsencrypt/live/mysite.com/privkey.pem; 
    include /etc/letsencrypt/options-ssl-nginx.conf; 
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    location / {
        proxy_pass http://127.0.0.1:8080/;
    }

    auth_basic "nginxui secured";
    auth_basic_user_file /etc/apache2/.htpasswd;
}
@thijsjek
Copy link

So, if you expose the nginx only on port 443, it wont be able to use port 8080.
If you only use this on the lan, then auth is almost obsolete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants