Base_url issue when deploying OJS using Docker and Apache

We are having a problem deploying OJS 3.3.0.14 using Docker and Apache to a sub-path of the domain. Only HTML and public (images etc.) appear at https://www.example.com/somePath - but CSS and JS are attempted to be loaded from the domain root, which expectedly returns 404.

As base_url in config.inc.php, we have set https://www.example.com/somePath. On the server, /somePath is the ProxyPass/ProxyPassReverse which exposes the docker containers port 80.

How can we configure OJS inside the docker container to use the sub-path defined as ProxyPass/ProxyPassReverse for loading CSS and JS from? Thanks :+1:

What image are you running?

We use image: pkpofficial/ojs:3_3_0-14.

additional observation: Apparently, the problem does not exist with image: pkpofficial/ojs:3_3_0-13.

1 Like

Ok… then it’s my fault because I released the image but I didn’t find time to test it properly.
(BTW, same happens with 3.4-rc1 that is also broken).

Before going deeper, let me ask @asmecher if there is any change in 3.3.0-14 related with Proxy, Routing or Config settings that could interfere.

If not, we will need to narrow the problem assuming the issue is in the container configuration.

@ojsbsb, any further information in your php and apache logs that could help?
Do you mind to compare php versions and plugins in 3.3.0-13 and 3.3.0-14?

Thanks for your help,
m.

Hi all,

if there is any change in 3.3.0-14 related with Proxy, Routing or Config settings that could interfere.

Nothing comes to mind since the introduction of the allowed_hosts setting in 3.3.0-9 (Add support for limiting allowed hosts · Issue #7649 · pkp/pkp-lib · GitHub).

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Feel like this issue is related (and fixed) in this thread:

TL;DR; the 3.3.0-14 docker image was running php 8.1 and it is not deeply tested.
Image recreated over php 7.4 and (at least in my laptop) all works fine.

About the rc1 issue… I probably pulled the code from git in a bad moment because today the build script worked great with rc2. I will rebuild rc1 to see if I can fix it (although nobody will be probably interested in rc1 images right now).

Update: RC1 image renewed and now is working fine.
My guess would be my first attempt of creating the RC1 image was over an unsync lib-pkp subproject.

Closing this issue so we could focus in the other post.