Last active
June 10, 2017 01:29
-
-
Save ziazek/2bc91b08c62f6cbeae4e9790f079b433 to your computer and use it in GitHub Desktop.
Nginx config file
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 deploy_phoenix { | |
| server 127.0.0.1:8888; | |
| } | |
| map $http_upgrade $connection_upgrade { | |
| default upgrade; | |
| '' close; | |
| } | |
| server { | |
| listen 80; | |
| server_name example.com; | |
| ## ADD THIS | |
| location /.well-known { | |
| alias /home/deploy/certbot/.well-known; | |
| } | |
| ## /ADD THIS | |
| location / { | |
| try_files $uri @proxy; | |
| } | |
| location @proxy { | |
| include proxy_params; | |
| proxy_redirect off; | |
| proxy_pass http://deploy_phoenix; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header Host $host; | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection $connection_upgrade; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment