WWW Server Setup Tips: Setting up the Server

Previous Next Table of Contents

## 4. Setting up the Server

After the apache RPM is installed, several directories will be created on your system:

> `

>     /etc/httpd/conf     - configuration files
>     /var/log/httpd      - log files
>     /home/httpd/html    - where your HTML files will go
>     /home/httpd/cgi-bin - where CGI programs go
>     /home/httpd/icons   - some icons used for directory indexing, etc.

> `

A sample home page will be installed in `/home/httpd/html`, and several sample CGI programs will be installed in `/home/httpd/cgi-bin`.

Before starting up the server, you may want to take a look at some of the configuration files in `/etc/httpd/conf`. These include:

- `access.conf`: This file controls access to your WWW server. One of the things you might want to change here are the ``allow'' and ``deny'' lines, which restrict who can get WWW pages. By default, all hosts are allowed. You may, for instance, want to change this so that all hosts are allowed, except for one problem host:

  > `

  >     <Limit GET>
  >     order allow,deny
  >     allow from all
  >     deny from b1ff.eleet.com
  >     </Limit>

  > `

  This will prohibit the host b1ff.eleet.com from accessing the server, but allow all other hosts. Another example is to restrict access to only your own domain (for an internal WWW server):

  > `

  >     <Limit GET>
  >     order deny,allow
  >     deny from all
  >     allow from gizmonics.edu
  >     </Limit>

  > `

  This allows only hosts in the gizmonics.edu domain to access to server.
- `httpd.conf`: This file has some general configuration information for your WWW server. One thing you should change here is the ServerAdmin line, which should have the address of your site's ``webmaster'':

  > `

  >     ServerAdmin webmantis@spaceghost.com

  > `

  If you want to run ``virtual hosts'', this is where you'll set up that information. Virtual hosts are beyond the scope of this document - consult the Apache documentation at `http://www.apache.org/` for more on this.
- `mime.types`: You shouldn't change anything in here.
- `srm.conf`: This file contains information about directories, files, and file types on your server. Most of this can be left as is; however, if you want to support server-side includes on your server, you should uncomment some of the AddType lines, as indicated in the file's comments. Server-side includes are a potential security risk, so they are disabled by default.

Previous Next Table of Contents