We need some advice on setting up HTTPS. Our OJS installation is running behind NGINX.
SSL certificates are on NGINX (listening on port 443), while OJS is running on Apache2 (port 80). What we need is to make OJS pass correct links to its resources (either ‘//’ or ‘https’).
If we enable the appropriate option in the
config.inc.php, we get infinite redirects.
The protocol is defined by the
$_SERVER['HTTPS'] variable. If it is not ‘OFF’, OJS uses HTTPS and generates correct links. The problem is we cannot change this variable from NGINX. Usually some additional header is used in such cases, like
X-HTTPS-Protocol. But OJS does not check such headers.
As a temporary measure, we have inserted
$_SERVER['HTTPS'] = 'on' as a first line in the
But we think, there should probably be some option in
config.inc.php, which would allow OJS to generate correct links AS IF it used HTTPS even if it works through HTTP.
Any advice would be much appreciated!