After you make configuration changes to a web server, you need to restart it. This article describes how to restart the Apache web server built into IBM i.
Figuring out which web server to restart
If you don’t know the name of the web server to restart, here are two ways to determine the name:
- If the server is running, run
WRKACTJOB to view job names under the
QHTTPSVR subsystem. Job names correspond to the web server names.
- Server definitions are stored in the
/www folder. Listing the directories under www will show you what web servers are known.
Site names can’t be longer than ten characters.
Restart through the HTTP admin interface
You will need to make sure the web administration site is running. Navigate to
http://ibmihost.example.org:2001/HTTPAdmin (putting in the hostname for your IBM i) and log in as needed.
From the “manage web servers” interface, you can look at a list of servers and stop/restart/reconfigure the ones you need.
Restart with commands
You can end the web server like so from 5250 with the
endtcpsvr server(*http) httpsvr(yoursitehere)
And start it again like so with the
strtcpsvr server(*http) httpsvr(yoursitehere)
Of course, substitute “yoursitehere” for the name of your web server.
If you want to run these commands from PASE, you can use the PASE system command (which lets you run CL commands) like so:
system strtcpsvr "server(*http) httpsvr(yoursitehere)"
The quotes are used because parenthesis and asterisks are important to the PASE shell, and not quoting the arguments to the CL command would make them get interpreted by the PASE shell.