Running Fisheye behind Nginx Proxy

Shamil Nunhuck October 11, 2012

Hi, I'm trying to run Fisheye behind a proxy. So far, I've managed to get Jira and Stash to work behind the proxy, but not Fisheye.

Here's my config file in Nginx:

server {

listen   80;

server_name  dev.int.com;

access_log off;

location / {

    proxy_pass http://IP: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://IP:8080/jira  /;

    proxy_connect_timeout 300;

    }

 

location ~ ^/stash {

    proxy_pass http://IP:7990;

    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://IP:7990/  /stash;

    proxy_connect_timeout 300;

    }

 

location ~ ^/crucible {

    proxy_pass http://IP:8060;

    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://IP:8060/  /crucible;

    proxy_connect_timeout 300;

    }

 

    error_page   500 502 503 504  /50x.html;

    location = /50x.html {

    root   /usr/local/nginx/html;

    }

}

and in Fisheye:

<web-server site-url="http://dev.int.com/crucible" context="/crucible">

        <http bind="http://dev.int.com/" proxy-port="80" proxy-scheme="http" proxy-host="dev.int.com/crucible"/>

    </web-server>

However, it just isn't pushing stuff out properly, and is a Fisheye problem --> When I visit /crucible, it does show the Crucible page, however, it doesn't load any page resources or ajax. Trying to login takes me to /login, so it's apparent that Fisheye is still on / for its context path despite its config file. I have restarted both Fisheye and Nginx server to no avail.
Any guidance would be appreciated :)

2 answers

1 accepted

1 vote
Answer accepted
Douglas Fabretti
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 11, 2012

Hi Shamil.

Looking at the FishEye/Crucible config and based on the NGINX proxy config I can see a few problems with the config.xml:

* <http bind="http://dev.int.com/"> - here it should contain the port where FishEye/Crucible runs - <http bind=":8060">
* <proxy-host="dev.int.com/crucible"/> - here the value should be only the name of the proxy host - <proxy-host="dev.int.com"/>

The rest of the configuration does seems ok.

Cculd you please do the modifications above and restart FishEye/Crucible? After that please let me know if the problem was solved.

Cheers,
Douglas Fabretti
Atlassian Support

Shamil Nunhuck October 12, 2012

Yep, that fixed it - Thanks :)

1 vote
Ryan Hass April 4, 2013

You may also want to add "proxy_buffering off;" to your location as it will force nginx to send reponses syncronously. This will give a more reponsive feel as the user will not have to wait for the page to completely load into the buffer before nginx sends the data to the user.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events