It‘s very simple to configure a IBM HTTP Server / Apache service on a server. But sometimes, considering the cost or any other reason, we need to share a physical server and configure 2 or more Web services. How to do it?
Here I list out the major steps for reference and for my own record.
These articles will not only contains how to configure, also will show you how to do some troubleshooting. All the experiences were summarized from my currently work, hope it is meaningful for you.
Let‘s begin,
Saying we have configured 1 IHS service on the server and can access it via 192.168.67.100(:80, or any other port), and we need to add another site which should be access via 192.168.67.101(:80, or any other port).
1) Add a virtual IP into the server.
2) Confirmed the 80 port of the new added IP is not listened by any other services.
3) Copy the httpd.conf file to httpd2.conf, and modify them.
4) Create the needed folders (DocumentRoot, log folder, etc.) and add Hostname/IP entry in the hosts file (if needed).
5) Start the IHS/Apache service.
6) Verify if the changes works.
Below I provide the detailed steps for reference:
1) Add a virtual IP into the server.
There are some difference between Windows and Linux server.
For Windows:
1. Open the "network and sharing center", and open the properties of the network device. Click "properties".
2. Follow the steps of below to going to add a virtual IP.
3. Add the IP and mask. Mask should be same as the original one. Click Add.
4. Verify if the IP have been added successfully. Can just simple use a "ping" command.
Good! The Virtual IP have been added to the server and it could be used to access data now!
For Linux:
As there are plenty of Linux release versions and the network settings are not the same, so now I only paste the Suse Linux for reference.
1. Become root on your system, either by logging into that account or using the su command.
2. Change your current directory to the /etc/sysconfig/network-scripts directory with the command:
cd /etc/sysconfig/network-scripts
3. Check for existing network adapters with the command:
ls ifcfg-eth*
and look for a file named similar to ifcfg-eth-id-12:34:56:78:90:ab. The colon-delimited letters and digits at the end are the MAC address (hardware address) of the Ethernet adapter.
4. To create the new interface, you will edit ifcfg-eth-id-12:34:56:78:90:ab. The file should contain lines similar to:
BOOTPROTO=‘static‘
BROADCAST=‘24.249.162.255‘
IPADDR=‘24.249.162.194‘
NETMASK=‘255.255.255.0‘
NETWORK=‘24.249.162.0‘
STARTMODE=‘onboot‘
USERCONTROL=‘no‘
_nm_name=‘bus-pci-0000:01:04.0‘
and will contain additional lines. At the bottom of this file, you should add lines similar to:
IPADDR1=‘24.249.162.195‘
NETMASK1=‘255.255.255.0‘
LABEL1=‘0‘
5. to add the extra address and then you should issue:
/etc/init.d/network restart
to restart networking and activate the new IP address.
6. Verify. Also use ping command.
Cheers! So now we have added a new virtual IP into the server. If you need more website be created on the same server, just repeat the same steps.
I will be show you the other steps in the next section.
Configure mutiple IBM HTTP Server / Other Apache based WEB server on 1 physical server (Section 1),古老的榕树,5-wow.com