Apache config

Posted on

I have a website www.example.com on a hosting provider. We use that provider because it has a simple site builder my wife uses to maintain the site. Moving off of it isn't an option for this exercise.

I want to create an Apache proxy that can accept traffic for www.example.com that will simple pass all requests along to that hosted site, which is a vhost so hostname must be retained. I want to do this so I can use that proxy to add TLS (the hosting provider won't let us without charging triple - yes, they suck, but again, leaving isn't an option).

What I've got so far:

<VirtualHost *:80>
    ServerName www.example.com
    ServerAlias example.com
    RequestHeader set Host "www.example.com"
    ProxyPreserveHost on
    ProxyPass / http://192.168.193.133 # IP of providers vhost
    ProxyPassreverse / http://192.168.193.133
    RewriteEngine On
</VirtualHost>

Responses