Skip to content

Instantly share code, notes, and snippets.

@matinrco
Created July 7, 2018 11:42
Show Gist options
  • Select an option

  • Save matinrco/d80c1dd2b28a752e3c5e3d918e74b80b to your computer and use it in GitHub Desktop.

Select an option

Save matinrco/d80c1dd2b28a752e3c5e3d918e74b80b to your computer and use it in GitHub Desktop.
Sample nginx configuration when using cloudflare with ssl & nginx proxy pass
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