Problems with Login in OJS behind reverse proxy

Hi, I’m having problems with Login in and OJS installation which is behind a reverse proxy: I enter my login and password but login fails. My version of OJS is 3.3.0.14. The reverse proxy assures that every site in the domain has https

I’ve changed in file config.inc.php the values base_url, base_url[index], base_url[myJournal] to the public URL and everthing works fine, except for the fact that the pdfs content of my Journal where not rederend: I fix the problem changing the function getUrlBase in the file PKPRequest.inc.php as suggested in the Forum which solved the problem. However I can’t still login in OJS: I put my user and password correctly, but a message of Incorrect user or password is shown

Thank you in advance for any suggestion about how to solve the problem.

Camilo Freire

You should probably use a .htaccess instead of redirect to https domains with a reverse proxy.

My journals (10+) are published behind a reverse proxy too, but all http request are redirected to https with a .htaccess.

Mybe you need configure a proxy server (the reverse proxy) in config.inc.php too.

This post could be of your interest:

In short:

  • Try with this settings:
    base_url[index] = https://foo.org/journalContext/index base_url[journalContext] = https://foo.org/journalContext trust_x_forwarded_for = On force_ssl = Off

If fails, be sure your virtualhost or htaccess includes:

  • Set SetEnvIf X-Forwarded-Proto "https" HTTPS=on.

In worst scenario, you will need to patch getProtocol() function.

2 Likes