Avatar of PDiddyHix
PDiddyHix
 asked on

How do I host multiple websites on multiple web servers on a single external IP address?

I am trying to deploy a new website on a new web server using SSL.  We already are using port 80 and 443.  I have registered a different domain name but I can't figure out how to map the DNS record to a port on my firewall that can be forwarded to the web server.  Any advice?
Software FirewallsDNS

Avatar of undefined
Last Comment
BBRazz

8/22/2022 - Mon
BBRazz

Is this a Windows or Linux Box. As IP CHains is listed in the zones I assume it is Linux.
Is Apache your Webserver?
If so then its a stright forward config.
Add the following to your apache conf

<VirtualHost x.x.x.x:80>
ServerName www.domain.com
ServerAlias domain.com
DocumentRoot /www/pathtofiles/httpdocs/
<Location />
Allow from all
</Location>
<Directory "/www/pathtofiles/httpdocs/">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
RewriteEngine on
</VirtualHost>
This configured a second site to be hosted on the server
-BBRazz
PDiddyHix

ASKER
The Firewall is a Linux Firewall (Untangle) but the new WebServer is Windows (MS SharePoint).and the old WebServer is Windows as well (PowerSchool)  Can I still do this at the router level or do I have to do it on the webserver itself?
Blaz

You can use any port you like, but you have to write
https://www.domain.com:81/
for port 81 for example.

You can't map DNS records to ports - DNS records map only to an IP.

You have several options:
1. Implement a proxy server at the firewall that will proxy requests to correct internal servers
2. Get an additional public IP
3. Implement a proxy server at the server which receives your current http traffic (port 80)

Note that apache server with mod_proxy module is sufficient. Also IIS supports some proxying.

You really should say more about your current configuration: firewall, current web server, new web server, ...
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER CERTIFIED SOLUTION
BBRazz

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
PDiddyHix

ASKER
You said:

However, SSL does need its own IP address. So you may need to request an additional IP if you have 2 SSL Sites.

So does that mean if I want to host 5 different sites securely, I must get 5 external IP addresses from my ISP?  Is there any other way?
BBRazz

Unless you want to use a non-standard SSL port for 4 of the 5 sites, then you can configure IIS to use another port.
-BBRazz
PDiddyHix

ASKER
Is there a downside to doing non-standard SSL ports and then using IIS to map to those ports like you mentioned above?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Blaz

Just to clarify - are the new and old server two distinct physical machines?

Yes, SSL needs an additional IP for every server. There are two ways arround this:
1. use different ports for each site
2. use wildcard certificates (on the same server) - all sites must be of the form *.yourdomain.com
BBRazz

As standard, a user is going to got to https://domain.com, but that wont work, they'll need to go to https://domain.com:445 where 445 is the none standard port.
-BBRazz