question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't log when using nginx reverse proxy with gitbucket on tomcat

See original GitHub issue

Hi,

I have installed gitbucket on tomcat8 (with something like that: http://exemple.org:8080/gitbucket) and I use nginx reverse proxy (to access it with http://git.exemple.org)

I can log in with http://exemple.org:8080/gitbucket but not with http://git.exemple.org: when I do that, it seems it simply reload the page.

I try to change the base url in the gitbucket.conf, without sucess.

What can I do?

here is my nginx configuration

server {
    server_name git.exemple.org;

    location / {
        proxy_pass              http://localhost:8080/gitbucket/;
        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_connect_timeout   150;
        proxy_send_timeout      100;
        proxy_read_timeout      100;
        proxy_buffers           4 32k;
        client_max_body_size    500m; # Big number is we can post big commits.
        client_body_buffer_size 128k;
    }

     location /assets/ {
        proxy_pass              http://localhost:8080/gitbucket/assets/;
        proxy_cache             cache;
        proxy_cache_key         $host$uri$is_args$args;
        proxy_cache_valid       200 301 302 1d;
        expires                 1d;
    }
}

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
fistonscommented, Sep 2, 2015

Thanks @officer , this was the problem. Now everything works great!

Thanks again!

1reaction
officercommented, Aug 31, 2015

It seems to be a problem of cookie path. try this configuration.

proxy_cookie_path /gitbucket/ /;

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to login after using Nginx HTTPS proxy
And I am able to do everything fine with the standard HTTP connector including login. Then I follow the document to setup the...
Read more >
Issues with configuration of Bitbucket Server with HTTPS ...
I've tried to use an own Bitbucket Connector in Tomcat, while using an reverse Proxy in Apache. Here are some of my files....
Read more >
gitbucket/gitbucket - Gitter
This can be caused by a misconfiguration of the reverse proxy (e.g. it has the wrong hostname or port for the upstream gitbucket...
Read more >
Load Balancing Apache Tomcat Servers with NGINX Open ...
You then set up NGINX Open Source or NGINX Plus as a reverse proxy and load balancer by referring to the upstream group...
Read more >
HTB: Seal | 0xdf hacks stuff - GitLab
In Seal, I'll get access to the NGINX and Tomcat configs, and find ... instance of GitBucket, which immediately redirects to a login...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found