Created
May 11, 2016 20:24
-
-
Save mangar/96b9ff4c3a55ef4d044af891990357b9 to your computer and use it in GitHub Desktop.
Nginx config upstream. Reverse proxy for docker + ngrok
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
| #user nobody; | |
| worker_processes 1; | |
| #error_log logs/error.log; | |
| #error_log logs/error.log notice; | |
| #error_log logs/error.log info; | |
| #pid logs/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| include mime.types; | |
| default_type application/octet-stream; | |
| #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
| # '$status $body_bytes_sent "$http_referer" ' | |
| # '"$http_user_agent" "$http_x_forwarded_for"'; | |
| #access_log logs/access.log main; | |
| sendfile on; | |
| #tcp_nopush on; | |
| #keepalive_timeout 0; | |
| keepalive_timeout 65; | |
| #gzip on; | |
| upstream rorweb { | |
| server 192.168.99.100:3150 fail_timeout=0; | |
| } | |
| # let gitlab deal with the redirection | |
| server { | |
| listen 80; | |
| server_name git.example.com; | |
| server_tokens off; | |
| root /dev/null; | |
| # Increase this if you want to upload larger attachments | |
| client_max_body_size 20m; | |
| # individual nginx logs for this vhost | |
| # access_log /var/log/nginx/gitlab_access.log; | |
| # error_log /var/log/nginx/gitlab_error.log; | |
| location / { | |
| proxy_read_timeout 300; | |
| proxy_connect_timeout 300; | |
| proxy_redirect off; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_set_header Host $http_host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Frame-Options SAMEORIGIN; | |
| proxy_pass http://rorweb; | |
| } | |
| } | |
| include servers/*; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment