JKL Toy Company adds a new directory to HTTP Server (powered by Apache)

This scenario discusses how to add a new directory.

Important: Information for this topic supports the latest PTF levels for HTTP Server for i5/OS . It is recommended that you install the latest PTFs to upgrade to the latest level of the HTTP Server for i5/OS. Some of the topics documented here are not available prior to this update. See http://www.ibm.com/servers/eserver/iseries/software/http/services/service.htm Link outside Information Center for more information.

Scenario

The JKL Toy Company (a fictitious company) has a need to add a directory to their JKLTEST configuration. The JKL Web administrator wants to create a directory to keep online employee profile information, such as current projects and contact information. Due to the large number of employees, a separate directory will be created to contain the employee profile information. The new directory will be called profiles.

Prerequisites

Start the IBM® Web Administration for i5/OS™ interface

Note: Enter your Webmaster user profile username and password when prompted.
  1. Start a Web browser.
  2. Enter http://[iSeries_hostname]:2001 in the location or URL field .

    Example: http://jkl_server:2001

    Note: If you have changed your port number for the IBM Web Administration for i5/OS interface, replace port 2001 with your port number.
  3. Click IBM HTTP Server for iSeries.
Note: If the IBM Web Administration for i5/OS interface does not start, see Install and test the HTTP Server.

Create a new directory

  1. Click the Manage tab.
  2. Click the HTTP Servers subtab.
  3. Select your HTTP Server (powered by Apache) from the Server list.

    Example: JKLTEST

  4. Select Global configuration from the Server area list.
  5. Expand HTTP Tasks and Wizards.
  6. Click Add a Directory to the Web.
  7. Click Next.
  8. Select Static Web pages and files.
  9. Click Next.
  10. Optional: Accept the default or enter a new directory name.

    Example: /www/jkltest/profiles/

  11. Click Next.
  12. Optional: Accept the default or enter a new alias name.

    Example: /profiles/

  13. Click Next.
  14. Click Finish.

Restart your HTTP Server (powered by Apache)

Select one of the following methods below:

Manage one server

  1. Click the Manage tab.
  2. Click the HTTP Servers subtab.
  3. Select your HTTP Server from the Server list.
  4. Click the Stop icon if the server is running.
  5. Click the Start icon.

Manage all servers

  1. Click the Manage tab.
  2. Click the HTTP Servers subtab.
  3. Select All Servers from the Server list.
  4. Click the All HTTP Servers tab.
  5. Select your HTTP Server name in the table.

    Example: JKLTEST

  6. Click Stop if the server is running.
  7. Click Start.
Note: If your HTTP Server (powered by Apache) does not start, see Troubleshoot.

Test your HTTP Server (powered by Apache)

  1. Open a new Web browser.
  2. Enter http://[iSeries_hostname]:[port]/[new_directory_alias]/ in the location or URL field.

    Example: http://jkl_server:1975/profiles/

Your new directory will display a generic HTML file provided by the IBM Web Administration for i5/OS interface.

View your HTTP Server (powered by Apache) configuration

Your configuration will look similar if you used the given example in this and previous examples.

  1. Click the Manage tab.
  2. Click the HTTP Servers subtab.
  3. Select your HTTP Server (powered by Apache) from the Server list.

    Example: JKLTEST

  4. Expand Tools.
  5. Click Display Configuration File.
Alias /profiles/ /www/jkltest/profiles/
Listen *:1975
DocumentRoot /www/jkltest/htdocs
ServerRoot /www/jkltest
Options -ExecCGI -FollowSymLinks -SymLinksIfOwnerMatch -Includes -IncludesNoExec -Indexes -MultiViews
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%{Cookie}n \"%r\" %t" cookie
LogFormat "%{User-agent}i" agent
LogFormat "%{Referer}i -> %U" referer
LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog logs/access_log combined
SetEnvIf "User-Agent" "Mozilla/2" nokeepalive
SetEnvIf "User-Agent" "JDK/1\.0" force-response-1.0
SetEnvIf "User-Agent" "Java/1\.0" force-response-1.0
SetEnvIf "User-Agent" "RealPlayer 4\.0" force-response-1.0
SetEnvIf "User-Agent" "MSIE 4\.0b2;" nokeepalive
SetEnvIf "User-Agent" "MSIE 4\.0b2;" force-response-1.0
<Directory />
	Order Deny,Allow
	Deny From all
</Directory>
<Directory /www/jkltest/profiles>
	Order Allow,Deny
	Allow From all
</Directory>
<Directory /www/jkltest/htdocs>
	Order Allow,Deny
	Allow From all
</Directory>