Git Product home page Git Product logo

Comments (4)

dometto avatar dometto commented on May 28, 2024

Hi @chardskarth, it seems to me the trouble you're running into is due to the docker port mapping in your example. I can reproduce the issue when I run the nginx service with port 80 mapped to port 3002 on the host, but not when I map port 80 to port 80 on the host (this requires the privileged setting for the nginx container). The reverse proxy is just redirecting the browser to the port that nginx runs on in the container, since it doesn't know that it's being mapped to port 3002.

Like I said, one option is to make the nginx service available on port 80 on the host. Alternatively, you can use the nginx SetHost directive to tell the reverse proxy to tell the browser to connect to the right port.

There's an additional issue with the gollum instance with --base-path enabled, which I can fix simply by changing the reverse proxy URL. I'll paste my final nginx config below.

In any case, this doesn't seem like a bug in gollun to me, but more of getting gollum, nginx, and Docker to play well together. Let me know if I'm missing anything!

from gollum.

dometto avatar dometto commented on May 28, 2024

Working nginx config:

server {
  listen 80;
  server_name ${GOLLUM_HOST};

  location / {
    proxy_pass http://${GOLLUM_DOCKER_HOSTNAME}:${GOLLUM_DOCKER_PORT}/;
    proxy_set_header Host $host:3002;
  }
}

server {
  listen 80;
  server_name ${GENERIC_HOSTNAME};

  location /wiki {
    proxy_pass http://${GOLLUM_DOCKER_HOSTNAME_WITHPATH}:${GOLLUM_DOCKER_PORT}/wiki;
    proxy_set_header Host $host:3002;
  }
}

from gollum.

dometto avatar dometto commented on May 28, 2024

Will close this, but let me know if I've missed anything and this needs to be reopened. :)

from gollum.

chardskarth avatar chardskarth commented on May 28, 2024

Hi man. Thanks a lot for this. Will try this out.

from gollum.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.