Announcement

#1 2024-02-14 11:03:49

helldunkel
Member
2024-02-14
2

[resolved] Upload stuck after first image if piwigo is behind a reverse proxy

Hi,

I can´t upload multiple photos. The upload stop after the first image.

I found that the reverse proxy make trouble. I use sophos utm 9 for reverse proxy. No waf rules, noch special settings, only ssl offloading and past host header.
Backend ist also encrypted (sohphos talks also ssl with the piwigo server, but self signed certificate.
No other web application had problems with this simple reverse proxy.

Is there a securtiy funktion in piwigo?
This happend a while ago I Updated piwigo and sophos.

At the first time, both systems work perfect.

Where can I start to debug?


Piwigo 14.2.0
PHP: 8.2.7
MySQL: 10.11.6-MariaDB-0+deb12u1 [2024-02-14 10:54:44]
Grafikbibliothek: ImageMagick 6.9.11-60
Debian 12

Offline

 

#2 2024-02-14 11:55:58

erAck
Only trying to help
2015-09-06
2043

Re: [resolved] Upload stuck after first image if piwigo is behind a reverse proxy

Searching this forum for reverse proxy might help.. e.g.
[Forum, post 187490 by ILikeTakingPictures in topic 33028] Photos do not 'auto load' when behind a Reverse Proxy
but I doubt there's any Sophos specific topic here.

Also, if your reverse proxy uses an unusual port (e.g. port 80 with https) you could try to force that in Piwigo, or in any case (see include/config_default.inc.php) add the port to local/config/config.inc.php:

Code:

// force an explicit port in the url (like ":80" or ":443")
// * 'none' : do not add any port, whatever protocol is detected
// * 'auto' : tries to smartly add a port based on $_SERVER variables
// * 123 : adds ":123" next to url host
$conf['url_port'] = '80';

Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2024-02-14 14:57:55

helldunkel
Member
2024-02-14
2

Re: [resolved] Upload stuck after first image if piwigo is behind a reverse proxy

I searched but don´t find a point to start.... most are local reverse proxys.
Here it is a infrastructure reverse proxy

Know I wait a long time with opened sophos log and upload 6 images.
First image done, the next 5 need about 10minutes to upload.

Log from sophos show satus 200 from get and post. No errors.
url where /i.php and /ws.php

There also no special ports https 443 and http 80. apache2 config on piwigo server bind to *:80 and *:443.

no virtual hosts or equal.

Offline

 

#4 2024-02-14 15:23:48

helldunkel
Member
2024-02-14
2

Re: [resolved] Upload stuck after first image if piwigo is behind a reverse proxy

Found this answer on github

[Github] Piwigo issue #849

and it worked....


"Also had this error, and commenting out line 401 in /admin/include/functions_upload.inc.php (//fetchRemote($derivative_url, $dest);) also resolved it."

I have no Idea, like the other admins, what happened if you did this "hack".
I am not a php or web developer. I am just a infrastructor admin who supports a datacenter and some of it`s applications.

now 30 images uploaded in seconds.

Why?

....

Offline

 

#5 2024-02-14 15:44:22

helldunkel
Member
2024-02-14
2

Re: [resolved] Upload stuck after first image if piwigo is behind a reverse proxy

And know all get a picture :-)

Solved it

Server are in the dmz. DNS name points to the outside reverse Proxy interface. The piwigo server could not reache this interface.

So I just put the entry in the hosts file:

127.0.0.1 domain.name

know the server find himself

picture upload worked

Offline

 

#6 2024-02-15 01:03:21

erAck
Only trying to help
2015-09-06
2043

Re: [resolved] Upload stuck after first image if piwigo is behind a reverse proxy

Good find, thanks for reporting back.


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact