Skip to content

Setting up HTTPS using LetsEncrypt and nginx reverse proxy

PhonicUK edited this page Jan 7, 2019 · 1 revision
server {
        listen                          443 http2;
        listen                          [::]:443 http2;
        ssl                             on;
        server_name           ;

        ssl_certificate                 /etc/letsencrypt/live/;
        ssl_certificate_key             /etc/letsencrypt/live/;

        location / {
                proxy_pass              http://your-amp-ip-or-localhost:8080;
                proxy_set_header        Host $host;
                proxy_set_header        X-Real-IP $remote_addr;
                proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header        Upgrade $http_upgrade;
                proxy_set_header        Connection "Upgrade";
                proxy_http_version      1.1;
                proxy_redirect          off;
                proxy_buffering         off;
                client_max_body_size    10240M;
You can’t perform that action at this time.