Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: How write virtualhost file including reverse proxy |
|
Author |
|
Havouza15
Joined: 28 May 2019 Posts: 1 Location: Cyprus
|
Posted: Tue 16 Jan '24 9:13 Post subject: How write virtualhost file including reverse proxy |
|
|
Hi!
I cant figure out how to write a virtual host file that also contains a reverse proxy. I have the reverse proxy working when I go to the site using ip, but now I need to add a domain
TIA
from a newbi |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Tue 16 Jan '24 13:08 Post subject: |
|
|
An example
Code: |
<VirtualHost *:443>
ServerName mail.example.com
DocumentRoot /home/jblond/www
<Directory /home/jblond/www>
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
SSLProxyEngine on
ProxyPass / https://webmail-internal.lan/
ProxyPassReverse / https://webmail-internal.lan/
ErrorLog /opt/apache2/logs/mail.example.com.error.log
TransferLog /opt/apache2/logs/mail.example.com.access.log
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/example.com-0001/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com-0001/privkey.pem
</VirtualHost>
|
|
|
Back to top |
|
|
|
|
|
|