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

Mixed content, reverse proxy setup #113

Open
Aeris1One opened this issue Jun 30, 2021 · 3 comments
Open

Mixed content, reverse proxy setup #113

Aeris1One opened this issue Jun 30, 2021 · 3 comments

Comments

@Aeris1One
Copy link

Aeris1One commented Jun 30, 2021

Hi,
I used --panel --database and modified docker-compose.yml to have the proxy container a fixed local ip (172.40.0.2) and not exposing ports 80 and 443. I have a bare-metal insalled nginx with ProxyPass panel.mydomain.com to 172.40.0.2:80 and handle all the SSL thing.
A problem is that when accessing https://panel.mydomain.com it works well (can login and visit all pages) but I can't create locations because of Mixed content, the page simply reloads without creating the location :
image

My Nginx config is :

   server_name  panel.domain.com;
   access_log off;
   location / {
       proxy_pass http://172.40.0.2:80;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header Host $host;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header X-Forwarded-Proto https;
       proxy_redirect off;
       proxy_buffering off;
       proxy_request_buffering off;
       port_in_redirect off;
       proxy_connect_timeout 300;
   }

   listen 443 ssl; # managed by Certbot
   ssl_certificate /etc/letsencrypt/live/panel.domain.com/fullchain.pem; # managed by Certbot
   ssl_certificate_key /etc/letsencrypt/live/panel.domain.com/privkey.pem; # managed by Certbot
   include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
   ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}

server {
   if ($host = panel.atrenia.fr) {
       return 301 https://$host$request_uri;
   } # managed by Certbot

   listen   80;
   server_name  panel.domain.com;
   return 404; # managed by Certbot
}

Also, in my conf.d/panel.env shows the good APP_URL=https://panel.domain.com/

That's not really an issue from pterodactyl-containers, I'm just asking for help because I basically don't know what i'm doing wrong :/

@TekExplorer
Copy link
Contributor

TekExplorer commented Jul 11, 2021 via email

@Aeris1One
Copy link
Author

Also, in my conf.d/panel.env shows the good APP_URL=https://panel.domain.com/

Yeah, I already verified, it's ok but there remains some http links :/

@BIackHornet
Copy link

BIackHornet commented Jan 20, 2022

Try adding the following line to your nginx config for this site, and restart nginx. In the location / block:

add_header Content-Security-Policy upgrade-insecure-requests;

Your should also run all your sites through https://securityheaders.com/ and increase your sites security with its recommendations.

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

3 participants