Support SSL configuration option #760

Closed
opened 2026-10-05 00:15:52 +02:00 by adam · 4 comments
Owner

Could you support an SSL=true configuration option in config.inc.php? My host is not SSL, which means that some links (such as straight after login) are 404 broken.

Could you support an SSL=true configuration option in config.inc.php? My host is not SSL, which means that some links (such as straight after login) are 404 broken. <!-- github-sync-id:299499894 -->
adam closed this issue 2026-10-05 00:15:52 +02:00
Author
Owner

I don't understand your request. Piwigo works fine on both HTTP or HTTPS on the same installation without any specific configuration. See http://demo.piwigo.com and https://demo.piwigo.com (even if we will certainly automatically redirect HTTP to HTTPS soon)

I don't understand your request. Piwigo works fine on both HTTP or HTTPS on the same installation without any specific configuration. See http://demo.piwigo.com and https://demo.piwigo.com (even if we will certainly automatically redirect HTTP to HTTPS soon) <!-- github-comment-id:367939550 -->
Author
Owner

I have an https front end reverse proxy (nginx) proxying to a backend apache server using http. When I login I get a 404 error (the protocol changes from https:// to http:// in my browser)

I have an https front end reverse proxy (nginx) proxying to a backend apache server using http. When I login I get a 404 error (the protocol changes from https:// to http:// in my browser) <!-- github-comment-id:368156224 -->
Author
Owner

Just to add some information: I could setup a redirect from http to https (but that would be insecure), but my request is that either piwigo stay on the same protocol throughout, or that there be an option to force piwigo to use SSL all the time.

Just to add some information: I could setup a redirect from http to https (but that would be insecure), but my request is that either piwigo stay on the same protocol throughout, or that there be an option to force piwigo to use SSL all the time. <!-- github-comment-id:368161298 -->
Author
Owner

Proxying NGINX to Apache+mod_php is a rather awkward setup (why not use some PHP fastcgi interpreter like php-fpm or uwsgi behind nginx?). Instead of requesting a workaround for such a setup in Piwigo which would be barely useful for anyone, you could enable SSL on apache, either using a self-signed cert or one from letsencrypt. Easy fix.

You could also try setting RequestHeader set X-Forwarded-Proto "https" in Apache for the Piwigo vhost/location, not sure if PHP will eat this though (check $_SERVER['HTTPS'] in phpinfo()).

In any case, it's a server setup issue rather than a Piwigo issue.

Proxying NGINX to Apache+mod_php is a rather awkward setup (why not use some PHP fastcgi interpreter like php-fpm or uwsgi behind nginx?). Instead of requesting a workaround for such a setup in Piwigo which would be barely useful for anyone, you could enable SSL on apache, either using a self-signed cert or one from letsencrypt. Easy fix. You could also try setting `RequestHeader set X-Forwarded-Proto "https"` in Apache for the Piwigo vhost/location, not sure if PHP will eat this though (check $_SERVER['HTTPS'] in phpinfo()). In any case, it's a server setup issue rather than a Piwigo issue. <!-- github-comment-id:374047318 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#760