Apache/Nginx as proxy server?

Dear Discourse community. I have a question that I hope you can help me with.

I would like to install Discourse on a dedicated Ubuntu virtual machine (Oracle VirtualBox). example: 192.168.6.15.

I already have Apache2 and Nginx servers running on the same local network.

Could I just use a proxy like:

(apache sample)

<VirtualHost x.x.x.x:443>
ServerName forum.example.org
RewriteEngine On

SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/forum.example.org/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/forum.example.org/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf

ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://192.168.6.15:4578/
ProxyPassReverse / http://192.168.6.15:4578/

</VirtualHost>

Would that work?
Is it good practice?
I guess let’s encrypt on a proxy server that will handle SSL?

Yes

Most of the time, no.

We already ship nginx inside the container, and we keep it configured and up to date with support for things brotli, http/2, non-buffering proxy, correct handling of client IPs, etc.

If you add a new proxy in the middle, then you are responsible for not breaking each of of those features.

3 Likes
  • Is this a production install for use, or a development install?
  • Will it be a local VM?
  • Will you be able to give it a name in DNS?
1 Like

Thank you all for your reply.

I followed the steps in this guide and installed it.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.