Piwigo.org

You are not logged in. (Register / Login)

Announcement

#1 2012-05-01 12:00:17

robin13
Member
Location: Munich, Germany
Registered: 2012-05-01
Posts: 2

Piwigo forwards to wrong port when used behind reverse proxy

My webserver configuration is:

Internet -> Varnish (piwig.mydomain.com:80) -> Lighttpd (localhost:8081)

i.e. connections from the internet first hit the reverse proxy (Varnish) on port 80, and are then forwarded to the lighttpd webserver backend running on port 8081.

For the most part (browsing images, uploading images), it works fine, but some links (e.g. "Home") direct to the correct domain (piwig.mydomain.com), but the internal port (8081), which is not (and should not be) accessible from the internet.

I have looked in the piwig_config table in the database, and grepped the piwig installation directory, but can't find anywhere to set the site url without the internal port number.

Is there any way to use pwigo behind a reverse proxy like this?

Offline

#2 2012-05-01 12:38:50

robin13
Member
Location: Munich, Germany
Registered: 2012-05-01
Posts: 2

Re: Piwigo forwards to wrong port when used behind reverse proxy

Here is my piwigo installation for you to see/test:
http://piwigo.robinclarke.net/

Offline

#3 2012-05-01 21:29:59

rvelices
Piwigo Team
Registered: 2005-12-29
Posts: 1556
Website

Re: Piwigo forwards to wrong port when used behind reverse proxy

I believe that you have to manually modify in file include/functions_url.inc.php, function get_absolute_root_url, the part with SERVER_PORT ...

Offline

Board footer

Powered by FluxBB

About this website · Donate · Contact Piwigo project © 2002-2013