Setting Up My Webhosting Server To Work As Reverse Proxy Server

Job ID: 33332401

Budget: $30 – $50 USD

I have a booking page (book.dar66.ae) which is hosted on another server (beds24.com) not related my webhosting server (different IP address). I created a CNAME record on my server to point to this booking page, which requires using an SSL certificate for the secure https protocol. Beds24.com has an SSL certificate but because I used my own domain with beds24.com certificate, the browser shows a warning message because the certificate does not match my own domain name.

The solution is to create a reverse proxy server on my own server, as follows:
Installing your own reverse proxy server
It is possible to do this yourself on your own server. We cannot provide support for any work on your server. These instructions are for a LAMP server.

You will need root access to your server, the ability to configure apache and the ability to install a SSL certificate. In principle a small virtual server should be adequate.

1) Setup a LAMP server for your domain.
2) Purchase an SSL certificate for your domain.
3) Setup apache to serve your domain using https:
For the proxy specify SSLProxyEngine On
4) Setup apache to work as a reverse proxy using one of the following configurations for your Apache Virtual Host.

# We're not an open proxy
ProxyRequests off
# Proxying is available for anyone
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
# The site we're proxying
ProxyPass / https://admin.beds24.com/
ProxyPassReverse / https://admin.beds24.com/

5) Create an A record for your domain pointing at your proxy server's IP address. If you have previously created a CNAME record for non SSL don't forget to remove it.
6) Install mod_evasive to block excessive traffic from individual IP's and prevent your entire proxy being blacklisted

apt-get install libapache2-mod-evasive
These are appropriate configuration values to enter in evasive.conf

DOSHashTableSize 3097
DOSPageCount 2
DOSSiteCount 10
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 10

If you are not using a LAMP proxy server, make sure your server sends requests with HTTP_X_FORWARDED_HOST set as your domain name.

https://wiki.beds24.com/index.php/Private_Label_SSL
Related categories: Linux Apache Web Hosting Ubuntu SSL