I want to install using a reverse proxy for Apache

You should define DISCOURSE_FORCE_HTTPS to true or set that setting in your system settings.