Created
July 7, 2018 11:42
-
-
Save matinrco/d80c1dd2b28a752e3c5e3d918e74b80b to your computer and use it in GitHub Desktop.
Sample nginx configuration when using cloudflare with ssl & nginx proxy pass
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
| server { | |
| listen 80; | |
| server_name example.com; | |
| if ($http_x_forwarded_proto = "http") { | |
| return 301 https://$server_name$request_uri; | |
| } | |
| location / { | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_pass http://dockerhost:10080; | |
| } | |
| client_max_body_size 500M; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment