mongo-express / mongo-express

Web-based MongoDB admin interface, written with Node.js and express
MIT License
5.55k stars 955 forks source link

Problem running mongo-express in docker-compose with apache reverse proxy. #600

Open samthom opened 4 years ago

samthom commented 4 years ago

Need not to be an issue with the application. I have this annoying issue with hosting mongo-express with apache reverse proxy. The page will never load instead it shows service unavailable page from apache. I am running everything in docker-compose with apache reverse proxy setup.

<VirtualHost *:80>
        ServerName www.db.service.in
        ServerAlias db.service.in
        ProxyPreserveHost On
        ProxyPass / http://127.0.0.1:8081/
        ProxyPassReverse / http://127.0.0.1:8081/

        RewriteEngine on
        RewriteCond %{SERVER_NAME} =www.db.service.in [OR]
        RewriteCond %{SERVER_NAME} =db.service.in
        RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

I think it has to do something with the headers. It was working fine with my nginx configs but I am new to apache and it was an existing server. Really appreciate any help.. Thank you

douglassllc commented 10 months ago

@samthom I know this is an older issue you posted, but could you share your nginx configration. I am attempting to use nginx proxy manager, which I have done with several applications. However, with mongo-express I receive a 502 Bad Gateway.

Did you ever get your Apache resolved. If so, what was the solution? As it might be helpful.

samthom commented 10 months ago

I don't have access to those configs anymore. I remember that I ended up using nginx instead of apache.