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
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, ...
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
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