OJS 3.4.0-5 PHP 8.3 site structure, scripts and css lost behind a reverse proxy

The site is working well for all journals in http but when we use a reverse proxy (through nginx proxy manager) to connect a domain through https, all the structure of the site as well as connection information are lost.
With the system certificate and https, the site is accessible after acceptance
image

It is also accessible as long as it is through http
image

If we reverse proxy the https version, then we end on a bad gateway 502 error.
Do anybody use a similar reverse proxy system? I am no problem with any CMS or other web site but only ojs and ops.
How can I solve this? I was thinking of a local certification authority to certificate the internal ip address. Can you advise please?

What application are you using?
OJS-3.4.0-5 and OPS-3.4.0-5

Thank you for your reply
Best

Hi @r4pkp,

Have you configured the base_url[...] directives in config.inc.php with the base URLs that OJS should be using to generate URLs? In a reverse proxy environment, OJS cannot detect these from the request and they must be specified in the configuration file.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher
Thank you for the rapid reply. It is really appreciated. The issue seems to be resolved. I did not change the base_url[...] directives. But I included in a “.htaccess” file with this small activation instruction: SetEnvIf X-Forwarded-Proto “https” HTTPS=on
An it was sufficient for everything to work normally behind the nginx proxy manager.

After I had some issue with connecting to the site and the admin was not accessible due to the proxies I defined in the config.inc.php file. Thus I changed and putted them in comment. Now everything is working very good. I will check if configuring the base_url[%] will change something.
Best regards

1 Like

This topic was automatically closed after 13 days. New replies are no longer allowed.