I'm following this tutorial for configuring nginx as a reverse proxy for apache, everything works except for the last two sections.
From section 8 about configuring mod_rpaf, phpinfo should return
$_SERVER['REMOTE_ADDR'] = '146.185.137.240'
, but I get127.0.0.1
. How can I troubleshoot to see if mod_rpaf is working ? If I get it correctly mod_rpaf should rewrite some headers. I've correctly set the146.185.137.240
address in/etc/apache2/mods-available/rpaf.conf
asRPAF_proxyIPs
and restarted apache2 usingsudo systemctl reload apache2
. The address146.185.137.240
comes fromping robertvandeneynde.be
.From section 9 about https, I should have
$_SERVER['SERVER_PORT'] = 443
but I have80
. Therefore, my php application (moodle.org) thinks it's under http and not https because$_SERVER['HTTPS']
is not set and$_SERVER['SERVER_PORT'] = 443
and therefore it's creating http and not https url everywhere, leading to a lot of weird bugs.