Jungle Coder
web home of a storyteller, witness & accomplice. you decide the order
Just added post themes! Witness The Colors, and Exult!

Adventures in using Nginx as a reverse proxy

Lately I’ve been trying to learn how to run more than one web application on a web server. I understand this often involves using nginx as a reverse proxy. I’ve been interested in rewriting my blog in Elixir/Phoenix, but I want to keep the current blog up while I’m making the changes. So I’ve been stumbling through nginx reverse proxy tutorials. I will be taking notes into this post about various things that I’ve learned about how to set up nginx as a reverse proxy for golang applications like this blog.

Currently my config is below:

Some notes:

That’s all for now.

server {
        listen 443;
        server_name junglecoder.com;

        ssl on;
        ssl_certificate /etc/letsencrypt/live/junglecoder.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/junglecoder.com/privkey.pem;


        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
        ssl_prefer_server_ciphers on;
        ssl_session_timeout 5m;
        ssl_session_cache shared:SSL:50m;
        # ssl_stapling on;
        # ssl_stapling_verify on;


        location / {
                proxy_cookie_domain localhost junglecoder.com;
                proxy_pass http://localhost:8080;
        }
}

Comments

Previously: PowerShell: Organizing Desktop Detrius into Dated Folders
Next: Ideas for LD36