Skip to content

Instantly share code, notes, and snippets.

@ba11b0y
Created May 23, 2018 19:31
Show Gist options
  • Save ba11b0y/dcbfba960becc341655f13f739dfdac0 to your computer and use it in GitHub Desktop.
Save ba11b0y/dcbfba960becc341655f13f739dfdac0 to your computer and use it in GitHub Desktop.
Nginx Config for HTTPS
server {

    # SSL configuration

    listen 443 ssl http2 default_server;
    server_name 35.154.10.21;
    listen [::]:443 ssl http2 default_server;
    include snippets/self-signed.conf;
    include snippets/ssl-params.conf;

    location = /favicon.ico { access_log off; log_not_found off; }
    location /static/ {
        root /home/ubuntu/FINlit;
    }

    location / {
        include proxy_params;
        proxy_pass http://unix:/home/ubuntu/FINlit/Finlit.sock;
    }

}

server {
    listen 80 default_server;
    listen [::]:80 default_server;
    server_name 35.154.10.21;
    return 301 https://$server_name$request_uri;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment