Monday, October 12, 2026

Wednesday, September 24, 2014

How to create service for apache webserver in windows manually

Incase if you have not chosen "Add as a service" option during the Apache or IHS installation, Then you will have to add the Apache service manually to the windows services. This would start and stop the webserver automatically during the windows reboot.

Following steps will guide you to manually create a service for apache webserver in windows.

Commands:

To create a service:

Syntax:  sc <server> create [service name] [binPath= ] <option1> <option2> ..

sc.exe create "servicename" binPath= "E:\bin\httpd -k runservice" DisplayName= "somename" start= auto

ex: sc.exe create apacheservice binPath= "E:\bin\httpd -k runservice" DisplayName= "Apacheservice" start= auto

Following message will indicate a successful service creation.

[SC] CreateService SUCCESS

NOTE: Ensure that there is a space after the "=" symbol or else the command will fail. Following message will be displayed in case of wrong syntax.


To Delete a service:  

sc.exe delete apacheservice 

[SC] DeleteService SUCCESS 

Testing:

go to run prompt, type service.msc. The newly created service will be visible. You can right click and change the properties, start and stop the service.

This similar exercise can be used for other services as well, Only the command will differ. 

                                 (: Happy learning :)

 

Thursday, September 18, 2014

Unable to load config info from /usr/local/ssl/openssl.cnf


Issue: While trying to generate the csr from the key using openssl in windows, The following error will be displayed.

 

Solution: download the openssl.cnf file from the following link and paste the file any location. I prefer to keep the files in config folder of openssl folder structure.

You will get this error while trying to generate the csr. Incase if you do not know the steps to generate key,cse and crt. Please go through the following link.

Configuring ssl with apache

The commands from the above link would be similar for windows as you are using openssl.

After placing the openssl.cnf file, use the following command to generate the csr. 

openssl req -new -key server.key -out server.csr -config < path of openssl.cnf>

This command will ask you for the common name,organization unit name etc. After providing all the details a csr will be generated. A vendor signed or self signed certificate can be requested.

                                 (: Happy learning :)

Sunday, September 14, 2014

How to integrate IHS with Websphere application server ND - Generate and Propagate IHS plugin

Using script : With the IHS installation, The configurewebserver1.bat is created in the plugin bin folder of the IHS installation. Copy the script to the remote server deployment manager bin and run the script. This script will create the webserver1 configuration. Once the script is run, Restart the DMGR and access the console, You should be able to see the webserver1 definition created.

Manual Creation:

Login to the WebSphere Application server console and navigate to the webservers section.



Click on new -> Choose the server node and add a server name -> I have given webserver1 -> Type is IBM HTTP Server -> Next

Next

Enter the IHS server details




Finish

IHS and WAS on same Server: (Standalone Node)

Now click on the check box of the webserver1, Generate Plugin and Propagate Plugin. This is copy the plugin.xml to the webserver. Now the communication between the websphere application server and the webserver is successful.

IHS on remote server: (Remote Node)

When you have the IHS and WAS on different server, Then remote server management comes into picture. Ensure the firewall port is open between the two servers so that the communication doesn't break during the generation and propagation of plugin.  Click on remote server management and specify the userid and password for the IHS. These credentials were specified when you are installing the IHS webserver.

Test:

Access any of the sample deployed applications via IHS url

ex: WAS URL : http://localhost:9080/PlantsByWebsphere
Now IHS URL : http://localhost/PlantsByWebsphere - Here you are able to access the application via IHS.

                                 (: Happy learning :)

Thursday, September 11, 2014

How to integrate IHS with Websphere application server ND - Generate and Propagate IHS plugin

Using script : With the IHS installation, The configurewebserver1.bat is created in the plugin bin folder of the IHS installation. Copy the script to the remote server deployment manager bin and run the script. This script will create the webserver1 configuration. Once the script is run, Restart the DMGR and access the console, You should be able to see the webserver1 definition created.

Manual Creation:

Login to the WebSphere Application server console and navigate to the webservers section.



Click on new -> Choose the server node and add a server name -> I have given webserver1 -> Type is IBM HTTP Server -> Next

Next

Enter the IHS server details




Finish

IHS and WAS on same Server: (Standalone Node)

Now click on the check box of the webserver1, Generate Plugin and Propagate Plugin. This is copy the plugin.xml to the webserver. Now the communication between the websphere application server and the webserver is successful.

IHS on remote server: (Remote Node)

When you have the IHS and WAS on different server, Then remote server management comes into picture. Ensure the firewall port is open between the two servers so that the communication doesn't break during the generation and propagation of plugin.  Click on remote server management and specify the userid and password for the IHS. These credentials were specified when you are installing the IHS webserver.

Test:

Access any of the sample deployed applications via IHS url

ex: WAS URL : http://localhost:9080/PlantsByWebsphere
Now IHS URL : http://localhost/PlantsByWebsphere - Here you are able to access the application via IHS.

                                 (: Happy learning :)

Install and Configure IBM HTTP web server(IHS) with websphere application server ND

Following steps will guide you to Install and integrate the IHS webserver with Websphere Application server ND.

Extract the installable and run install.exe



Click on Next >> Accept the terms and conditions and click on Next >>

Warning: A supported operating system was not detected.


 Don't worry about the above error, Support for your operating system might have been added after the release of the product. See the WebSphere Application Server detailed system requirements Web pages for more information about supported operating systems. You can continue with the installation.



Enter the installation directory, This directory will hold all the installation configuration files.



80 and 8008 are default ports for IHS and admin server. In case if you want to choose any port other than 80 you can change the ports here. In case if you want to change the ports after installation that can be done in httpd.conf file.

In-case if you don't want to add the IHS as windows server un check the two options and proceed. However, You can add the windows password or local user password if you want to run the webserver as a windows service.

Next comes the admin server credentials, If you select the option to provide the authentication, These credentials will be used during the plugin propagation from WebSphere application server. Note down the user and password provided here. The credentials will be stored in admin.passwd file with the password encrypted.

Next comes the plugin installation, Provide the Ip address or the host name of the application server.



After going through the summary, Click on Install. This will successfully install IHS and plugin configuration.

Now navigate to C:\HTTPServer1

Ensure that the httpd.conf has the correct host name and the port number.

Admin privileges are required to start the process running on port 80. Navigate to the bin folder

C:\HTTPServer1\bin\httpd.exe -k start ( IHS process will start running)

Check if the port is listening.


Access the url : http://localhost:80, The following welcome page will be displayed.



To Integrate the Webserver with the Websphere Application Server click here

                                 (: Happy learning :)