wmnnd / nginx-certbot

Boilerplate configuration for nginx and certbot with docker-compose

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

504 on https

markowanga opened this issue · comments

Hello,
I tried to configure the proxy and I have always 504 with https.
Here is my nginx config

server {
    listen 80;
    server_name dss-nexus.mydomain.pl;
    server_tokens off;

    location /.well-known/acme-challenge/ {
        root /var/www/certbot;
    }

    location / {
        return 301 https://$host$request_uri;
    }
}

server {
    listen 443 ssl;
    server_name dss-nexus.mydomain.pl;
    server_tokens off;

    ssl_certificate /etc/letsencrypt/live/dss-nexus.mydomain.pl/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/dss-nexus.mydomain.pl/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    location / {
        proxy_pass  http://192.168.0.124:8081;
        proxy_set_header    Host                $http_host;
        proxy_set_header    X-Real-IP           $remote_addr;
        proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
    }
}

Here is my part with config in init:

domains=(dss-nexus.mydomain.pl)
rsa_key_size=4096
data_path="./data/certbot"
email="mymail@gmail.com" # Adding a valid address is strongly recommended
staging=1 # Set to 1 if you're testing your setup to avoid hitting request limits

I allow untrusted cert, I have always 504 with https. (When I make redirect on port 80 to 192.168.0.124:8081) it works ok.

Thank you for help 😊

Ok, I have blocked connection by my firewall.