Skip to content

Instantly share code, notes, and snippets.

@appleboy
Created July 20, 2016 01:26
Show Gist options
  • Save appleboy/d96f6c64d0d152a6c7cdd8dfa905d906 to your computer and use it in GitHub Desktop.
Save appleboy/d96f6c64d0d152a6c7cdd8dfa905d906 to your computer and use it in GitHub Desktop.
nginx enkins virtual host setting
server {
listen 80;
server_name your_host_name;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Fix the "It appears that your reverse proxy set up is broken" error.
proxy_pass http://127.0.0.1:8081;
proxy_read_timeout 90;
}
}
@lulalachen
Copy link

Notice: Indentation is important lol
I stuck on this bug for half an hour

@appleboy
Copy link
Author

@lulalachen

WTF? What's going on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment