Our community of experts have been thoroughly vetted for their expertise and industry experience.
Published:
Updated:
Browse All Articles > Setting up IBM HTTP Server for starting/stopping from WAS console
There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task.
You need three things to start/stop and administer IHS server from within WAS admin console:
1. IHS admin server configured and running
2. admin credential created with password on IHS admin server
3. IHS server defined on WAS side and admin credentials stored in there.
Configuring IBM HTTP Server administration server is in fact configuring separate apache instance (httpd process daemon) and the product provides scripting tools to do that. However, Windows and Linux versions differ a bit in that aspect.
When your IHS installation is on Windows and you want to start/stop it from WAS console, you need to have your web server based on Windows service (if you just want to start/stop it manually from shell scripts it is not necessary). Now, there’s a manual way to configure Windows service, but this a topic for a separate article, so let’s assume we’re installing IBM HTTP Server with Installation Manager and we create corresponding Windows service underway, which is shown as a screenshot from IM below. Please note that “Startup type” option is set to “Manual” for greater control. Also, leave the setting for “Log on with local system account” as it is unless you need some specific account to use for your IHS.
Having done that, after your installation successfully finishes, go to Task manager-> Services toi confirm the service has been successfully created.
Now, go to the directory where HIS has been installed and find subdirectory named “conf”. There’s a file named admin.conf there and we need to make some adjustments there. Open it with your favourite text-file editor and change the following options:
# Port used to access the Administration Server Listen 0.0.0.0:@@AdminPort@@
Save and close the file. Our Admin server config is ready for now (in future you may want to customize the configuration to add SSL support for example, but let’s leave it at that for the time being).
On Linux however, setting up admin server is a little bit different, also we don’t need to care about Windows service (there’s a way of setting up IHS as Linux service, but again, different topic). So, after you have installed IBM HTTP Server on your machine, go to installation’s directory /bin subdir and use setupadm.sh tool to configure user and group for running administration server as in Linux (it must be non-root).
Detailed description for usage can be found here but let me give you example:
You might also check admin.conf file to ensure there’s correct port setup (IHS installation on Linux should have set it up to 8008). That’s all to be done to set up admin server on Linux systems.
What we need next is to create a credential on IHS admin server for WAS to be able to use to connect to the server (please note this is a different user that we specified with setupadm command!). We do that by going to /bin subdir of our installation (both Windows and Linux) and use following command:
And that’s it. Now we are ready to run the admin server by
going to /bin subdir of HIS installation and typing in httpd –f conf/admin.conf (on Windows). This will keep your command line occupied (until you stop the admin server by cancelling the job).
going to /bin subdir and using adminctl start (on Linux). The control should return to shell
You might want to check if server is in fact running by finding port 8008 occupied In netstat output:
And now the final part – configuring our HTTP Server in WebSphere Application Server console.
Log into the console, go to Servers -> Web Servers and create Web Server definition. Click New… and proceed through the screens inputing values accordingly:
Please note that Port should have correct value - given during installation time. (82 my case, but standard is 80). Also note that windows service name should match the one we found previously in Task Manager (when on Windows). Click Finish on the last screen and save the changes to your WAS config.
Now, we should be ready to start our web server from WAS console:
As can be seen, server has been successfully started and status check shows that server is running (WAS checks if web server is running by verifying socket open on specified port - 82 this case).
In this article we demonstrated how to set up IBM HTTP Server to be started/stopped from WebSphere Application Server's administrative console. Follow up steps might include setting up Websphere Plugin generated for web server to route requests from web server port to applications deployed on WAS, setting up SSL on external interface or between HTTP Server and WAS, but this shall be covered in separate articles.
Comments (1)
Author
Commented:Radek