Last active
July 31, 2020 12:52
-
-
Save cdesch/bc027f94ac3ec4fa5191b3867560806d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream phoenix_upstream { | |
server 127.0.0.1:4000; | |
} | |
server { | |
listen 80; | |
server_name espresso.kickinespresso.com; | |
return 301 https://$server_name$request_uri; | |
} | |
server { | |
listen [::]:443 ssl ipv6only=on; # managed by Certbot | |
listen 443 ssl; | |
server_name espresso.kickinespresso.com; | |
ssl_certificate /etc/letsencrypt/live/espresso.kickinespresso.com/fullchain.pem; # managed by Certbot | |
ssl_certificate_key /etc/letsencrypt/live/espresso.kickinespresso.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 | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_pass http://phoenix_upstream; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config :espresso, EspressoWeb.Endpoint, | |
http: [port: 4000], | |
check_origin: false, | |
cache_static_manifest: "priv/static/cache_manifest.json", | |
server: true, | |
code_reloader: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment