0

I'm following this tutorial for configuring nginx as a reverse proxy for apache, everything works except for the last two sections.

  1. From section 8 about configuring mod_rpaf, phpinfo should return $_SERVER['REMOTE_ADDR'] = '146.185.137.240', but I get 127.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 the 146.185.137.240 address in /etc/apache2/mods-available/rpaf.conf as RPAF_proxyIPs and restarted apache2 using sudo systemctl reload apache2. The address 146.185.137.240 comes from ping robertvandeneynde.be.

  2. From section 9 about https, I should have $_SERVER['SERVER_PORT'] = 443 but I have 80. 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.

1 Answers1

0

I just found the error, that's described in this question.

RPAF_ProxyIPs should be set to 127.0.0.1 10.0.0.0/24, I don't understand what it means, but it works.