The Configuration Folder
Contents / Initial Configuration
/ The Administration Area / Editing
Configuration Files
SWS is based on a simple configuration model: you may
have more than one use for your server, so you may want to configure it
more than one way. SWS provides the ability to create
and maintain any number of unique and separate configuration files, which
can be started and run as you need them.
For example, you may want a default configuration to run as a baseline
file. You may want a second to take advantage of the virtual hosting features
of SWS and assign multiple hosts to a single port. And, you may want a
third to emphasize statistics-gathering and logging for better tuning and
server performance. Whatever your needs might be, SWS makes it possible
to create and use any number of configuration files.
Initial Configuration
When you first install SWS it takes its initial configuration
from the default configuration file, /etc/http/httpd.conf. This
file:
- maps the default IP address to a default port (80)
- maps the IP address amd default port to the file system of the host
machine (document root)
- defines the document root and CGI directories
- establishes logging, access control, and cache sizes
Once SWS is running using the default configuration file,
you can customize the operation of your server by creating new configuration
files. If not already displayed, select Folders -> Configuration
to display the Configuration screen in the Administration
Area or choose Config -> New... to create a new
configuration.
The Administration Area
When you select the Configuration folder, the Administration Area changes
to display three parts:
The Configuration Status Bar
The Configuration Status Bar displays the name of the server configuration
currently being edited. The file name displayed is a file in the configuration
directory.
SWS will read and store all configuration files in the configuration
directory (/etc/http/ by default). You can set the location of
the directory by starting /usr/lib/http with the -config_dir
flag.
The Configuration Menu Bar
Menus contain commands used to do operations on SWS configuration
files. There are three Configuration menus: Config, Hosts, and Ports.
- The Config menu allows you to:
- New-Create a new configuration file from scratch (starting with
the built in server defaults).
- Open-Open a configuration file.
- Save-Save a configuration file.
- Save As-Save a configuration file to a new name.
- Undo-Undo changes made to the current configuration file since
the last Save.
- Delete-Delete a configuration file.
- Restart-Restart the server.
- The Hosts menu allows you to:
- New-Create a new host.
- [default]-Display a card with the parameters for the default
host (this will be the only host on a server that is not configured for
virtual hosting).
- (Host Name)-Display a card with the parameters for a specific
host. The Hosts menu contains one entry for each designated host.
- The Ports menu allows you to:
- New-Designate a new port definition.
- (Port Name)-Display the parameters for a specific port. The
Ports menu contains one entry for each designated port. There will be a
port card and sequential number for each IP address/port number combination.
The Configuration Cards
The Configuration folder has three (or more) tabbed cards that allow
you to select different parts of the server to configure. These include:
- Server-Used to set performance parameters
for the server.
- (Host Name)-Used to specify server,
root, and document directories, enable access control, and set up logging.
Each designated host has its own tabbed card.
- (Port Name)-Used to set port parameters.
Each designated port has its own tabbed card.
Editing Configuration Files
SWS configuration files can be edited using both the SWS Administration Console or by manually editing the files.
NOTE: When you save a configuration file with the Administration Console, and SWS restarts for any reason, it will hang because it will see two different versions of configuration files. To get around this, if you try to save a configuration file with the Administration Console, you will see a dialog box instructing you to edit the /etc/init.d/http script to reflect this new configuration file name change permanently.
It is also possible for more than one person to administer SWS
at a time, if for example, more than one person knows the administration
password. If this happens, a dialog box appears to warn users of a potential
conflict.
To Create a New Configuration File
- In the Folders area, select Configuration.
- Select New from the Config Menu. This pops up a box which asks
for a name for the new configuration. The file will be saved with this
name in the configuration directory.
- A new configuration with only built in server defaults will be loaded.
- Select the feature you want to configure by choosing one of the tabbed
cards.
- Make changes to the current configuration by entering new parameters
into the fields of the card.
- Save the new configuration by selecting Save from the Config
menu.
To Change An Existing Configuration File
- In the Folders area, select Configuration.
- Select Open from the Config Menu. This pops up a box with a
list of configuration files. Select the one you want to change and click
on the Open button.
- Select the feature you want to configure by choosing one of the tabbed
cards.
- Make changes to the current configuration by entering new parameters
into the fields of the card.
- Save the configuration by selecting Save from the Config menu.
This pops up a box with the name of the current configuration.
- Click on the Save button.