This Section will continue the actual configure for IHS related files.
3) Copy the httpd.conf file to httpd2.conf, and modify them.
Now Virtual IP have been added, and it‘s port 80 have been released, so we can start to do some needed configure.
Firstly, copy the httpd.conf file as httpd2.conf. For Apache based server, 1 Apache server instance need 1 httpd.conf file.
And what we need to be configured includes:
PidFile logs/httpd2.pid
DocumentRoot "C:/WEB_SITE/myaddress2.com"
Listen 192.168.67.101:80
<VirtualHost 192.168.67.101:80>
...
</VirtualHost>
TransferLog "|bin/rotatelogs.exe C:/WEB_LOG/myaddress2.com/access.%Y%m%d.log 86400 +480"
ErrorLog "|bin/rotatelogs.exe C:/WEB_LOG/myaddress2.com/error.%Y%m%d.log 86400 +480"
Now, if we start a new IHS instance with this configure file, then it will be a different instance.
4) Create the needed folders (DocumentRoot, log folder, etc.) and add Hostname/IP entry in the hosts file (if needed).
Actually what we need to create is only:
DocumentRoot "C:/WEB_SITE/myaddress2.com" and
TransferLog "|bin/rotatelogs.exe C:/WEB_LOG/myaddress2.com/access.%Y%m%d.log 86400 +480"
And for testing purpose, we put an index.html file into the document root folder:
After that, we‘d better add the domain of the IP into the hosts file so that we can access our website via both IP and domain name, we can define any domain name for our IP because it‘s a Internal IP.
5) Start the IHS/Apache service.
Go to the IHS home\bin folder, we will use the apache.exe to start the instance with the new httpd2.conf file.
Use this command to verify if the syntax of the config file is fine: apache.exe -t -f C:\IBM\HTTPServer\conf\httpd2.conf
In order to start the service, there are some difference between Linux and Windows:
Linux:
Windows:
We need to add the new service into the Windows service manager, and then start it via the Windows service UI:
Firstly, add the service:
C:\IBM\HTTPServer\bin>apache.exe -k install -n "ihs-myaddress2.com" -f C:\IBM\HTTPServer\conf\httpd.conf
Succeed! Then open services.msc, can see it have been added successfully.
Right click, and click start.
OK, the service have been started.
6) Verify if the changes works.
How to test?
Yeah, we are configuring a website infrastructure, of course the best way is test via browser.
Our web page have been displayed successfully. And you can continue to put more web pages into the document root folder.
Now, start to write your own website via maybe html and JS, if want to release it to Internet, may need some port forward configure in your home router device, and that will be another toy what can be play with.
Enjoy it!
Configure mutiple IBM HTTP Server / Other Apache based WEB server on 1 physical server (Section 3),古老的榕树,5-wow.com