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 using the HTTP admin GUI

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 using 5250-style commands

You can end the web server from a command line with the ENDTCPSVR command:

endtcpsvr server(*http) httpsvr(yoursitehere)

And start it again like so with the STRTCPSVR command:

strtcpsvr server(*http) httpsvr(yoursitehere)

Optionally, restart with a single command by adding the RESTART keyword:

strtcpsvr server(*http) restart(*http) httpsvr(yoursitehere)

Of course, substitute “yoursitehere” for the name of your web server.

From SSH and PASE Terminals

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.

IBM i Development

  • RPG, COBOL, SQL, Node,
    PHP, Python, Valance, etc.
  • Modernization. Integration.
  • Web and API Solutions
  • Legacy Maintenance
    ...
(or call 201.447.2437)
Open source support for IBM i

Got PHP Issues?
GET ANSWERS!

Your PHP should be trouble-free. If your current PHP environment is anything less than perfect, we can help!

SSL /TLS for IBM i