logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: How write virtualhost file including reverse proxy
Author
Havouza15



Joined: 28 May 2019
Posts: 1
Location: Cyprus

PostPosted: Tue 16 Jan '24 9:13    Post subject: How write virtualhost file including reverse proxy Reply with quote

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: 7374
Location: Germany, Next to Hamburg

PostPosted: Tue 16 Jan '24 13:08    Post subject: Reply with quote

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


Reply to topic   Topic: How write virtualhost file including reverse proxy View previous topic :: View next topic
Post new topic   Forum Index -> Apache