Skip to content

Instantly share code, notes, and snippets.

@burinov
Forked from cedricwalter/example
Created January 15, 2013 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save burinov/4540079 to your computer and use it in GitHub Desktop.
Save burinov/4540079 to your computer and use it in GitHub Desktop.
## Server configuration for nginx to host Atlassian Jira / Jetbrain TeamCity or any other Tomcat web application
#
# author cedric.walter, www.waltercedric.com
# to be saved for ex in /etc/nginx/sites-available/example
server {
listen 80;
server_name jira.example.com;
access_log off;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
port_in_redirect off;
proxy_redirect http://jira.example.com:8080/jira /;
proxy_connect_timeout 300;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment