Hi,
I'm trying to setup JIRA behind nginx. I'm getting problems with urls... For example when I try to go to the jira page instead of redirecting me to http://jira.example.com/secure/Dashboard.jspa it redirects me to http://jira.example.com/.example.com/secure/Dashboard.jspa
For reference here's my nginx configuration:
upstream jira {
server 127.0.0.1:4800;
}
# the server directive is nginx's virtual host directive.
server {
# port to listen on. Can also be set to an IP:PORT
listen 80;
# Set the max size for file uploads to 50Mb
client_max_body_size 30M;
# sets the domain[s] that this vhost server requests for
server_name jira.example.com;
# doc root
root /opt/atlassian/jira/atlassian-jira;
# vhost specific access log
access_log /var/log/nginx.jira.access.log main;
location / {
# needed to forward user's IP address to rails
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://jira;
}
}
At first the gadgets weren't working and I had the following error... 'jira' does not match expected hostname 'jira.example.com'
I fixed it by adding the following to conf/server.xml
< Connector port="8080" protocol="HTTP/1.1"
maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" useBodyEncodingForURI="true"
enableLookups="false" redirectPort="9443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true"
proxyName="jira.example.com"
proxyPort="80"
/>
What am I missing?