Frequently Asked Questions

1.0) Basic Q&A
1.1) What is NCSA HTTPd?
1.2) How do I install NCSA HTTPd?
1.3) What is CGI?
1.4) Where can I get HTTPd for Microsoft Windows TM or Windows-NTTM?
2.0) Using the Server
2.1) How do I create and process forms?
2.2) How do I setup a clickable imagemap?
2.3) How do I manage users for authentication?
2.4) How can I perform keyword searches?
2.5) How do I set up server-side includes?
2.6) How to add environment variables?
2.7) What else can I do?
3.0) Troubleshooting
3.1) My logfiles are not updated anymore...
3.2) When I submit a form, it gave me 501 error...
3.3) Can't start server with "unable to change gid" or "unable to setgroups" error...
3.4) My entire system grinds to a halt after I start HTTPd.
4.0) CGI
4.1) Does NCSA HTTPd support server push?
4.2) My images seem to come in chunks under server push.
4.3) I can't get my ErrorDocument for 401 Errors to work.
4.4) What does that "501 -- Not Implemented" error mean?
5.0) Other Features
5.1) Can I have hidden variables in forms?
5.2) Can I have multiple submit buttons?
5.3) What is PGP/PEM encryption?
5.4) Can I have my server use multiple names?

1.1) What is NCSA HTTPd?

NCSA HTTPd is a program to serve information, much in the same way that NCSA Mosaic is a program to browse information in the World Wide Web. From the Client-Server viewpoint, NCSA HTTPd is the Server to the Browser Client.

HTTPd stands for HyperText Transfer Protocol (HTTP) Daemon. HTTP is a protocol with the lightness and speed necessary for a distributed collaborative hypermedia information system.

1.2) How do I install NCSA HTTPd?

Read the documentation on NCSA HTTPd Installation.

1.3) What is CGI?

CGI stands for Common Gateway Interface. You can read an introduction and an overview.

1.4) Where can I find HTTPd for Microsoft Windows/NT TM?

For information on Microsoft WindowsTM HTTPd, please read this page.
For information on Microsoft Windows NT TMHTTPd , please read this page .
Note: Since these server packages were NOT developed by NCSA, we are not responsible for them. Our Technical Support Personnel don't know anything about them, and will not answer any questions about them.


2.1) How do I create and process forms?

First, read a tutorial on creating forms. Then, in order to handle the output from your forms, read how CGI supports forms.

Note: Not all sites allow all users to run CGI scripts on their servers. In order to run, a CGI script must be in a ScriptAlias directory or the server must allow CGI scripts anywhere by the CGI Magic Type convention. See the CGI Configuration Tutorial for more information.

2.2) How do I setup a clickable imagemap?

Read the documentation on the imagemap script and a tutorial on graphical information maps.

2.3) How do I manage users for authentication?

Read the documentation on managing users and a tutorial on user authentication.

2.4) How can I perform keyword searches?

You can use WAIS as a back-end search engine. Herein, a tutorial on WAIS and HTTP integration.

2.5) How do I set up server-side includes?

You can use server-side includes, to provide data to clients on-the-fly. For example, the current date or the size or last modification date for a file. Check out a tutorial on server-side includes.

2.6) How to add environment variables?

You can add environment variables when you use POST method.
For more infomation, please read CGI Environment Variables

2.7) What else can I do?

Read the complete documentation on server administration and some provided step-by-step tutorials.


3.1) My logfiles are not updated anymore...

This is probably because you moved them or erased them without restarting a standalone daemon. For more information, read the Logfile Management documentation.

3.2) When I submit a form, it gave me 501 error...

The error message says:

We are sorry to be unable to perform the method POST to non-script at this time.

This means that the server did not recognize the referenced URL (the URL defined as the ACTION in a HTML Form) as a CGI script. For the server to recognize the URL as a CGI script, it must either reside in a ScriptAlias directory or your site must allow CGI scripts anywhere. For more information, see the CGI Configuration Tutorial.

Note: Some versions of the NCSA HTTPd server request that you mail NCSA if you would like this feature supported in new versions of NCSA HTTPd. Nine times out of Ten we receive requests to support this feature, when in fact it was a misconfiguration which caused the error message. Please verify with the owner of the script/form before asking us to fix it.

3.3) Can't start server with "gid error"/"setgroups"

This may be caused by the values in User directive and Group directive. The default values for these two directives are all set to -1. These values are not valid on some systems. In particular, HP-UX does not support -1 or -2 as valid groups. By default, HP-UX defines nogroup as -2, but the server cannot use this. Also, newer versions of Linux don't like user/group nobody, so you have to make your own (such as www) to run under. Please consult with your system administrator to find the valid values.
NOTE: This is also one of the most common causes of core dumps and segmentation faults. If you have such problems, changing HTTPd's User and Group directives may be the solution.

3.4) My entire system grinds to a halt after I start HTTPd.

When you run HTTPd, your system may grind to a halt, as defunct and zombie processes take up more and more system resources. If you see this, you have the wrong setting of BSD. You should recompile with the correct BSD setting. For compiling information, see Compiling NCSA HTTPd.


4.1) Does NCSA HTTPd support server push?

The short answer is yes. NCSA HTTPd 1.4.x required server push CGI scripts to be nph- scripts (see nph documentation). This should not be necessary in NCSA HTTPd 1.5.

4.2) My images seem to come in chunks under server push.

In order to make server push work, you have to use non-buffered I/O. In Perl, this can be done by adding $|=1; somewhere before you start sending data. Under C, just use write instead of printf.

4.3) I can't get my ErrorDocument for 401 Errors to work.

In order for 401 Error messages to be correctly handled, an extra header giving information about what is required for authentication is required, the WWW-Authenticate header. Currently, the server does not automatically add this header to user specified ErrorDocuments, so a CGI script must be used, and it must add the WWW-Authenticate header on its own. See the nph-error.pl example.

4.4) What does that "501 -- Not Implemented" error mean?

NCSA HTTPd fully supports the POST, GET, and PUT methods. Under most circumstances, the problem is not that the HTML uses an unimplemented method, but that it uses the proper method on a file that cannot accept it.
If you see this error on a a page which is NOT your own, then you have two major courses of action:
  1. Try the same action on a different browser. If it works, then it's probably a problem with your browser -- some older versions and some new brands of browsers have problems. If it still doesn't work, then
  2. Notify the owner of the page. Send them any error information you got, and they should be able to fix it.

If this is your own page, then you can do the following:
For more information on setting up CGI scripts, check the following URLs:

5.1) Can I have hidden variables in forms?

Actually this is handled by the browser (e.g. NCSA Mosaic). In any case, there is an example with hidden variables in the documentation.

5.2) Can I have multiple submit buttons?

This is also handled by your browser. NCSA Mosaic for X as of v2.5 has support for multiple submit buttons. See an example to learn how to use them.

5.3) What is PGP/PEM encryption?

PGP and PEM are programs to allow you and a second party to communicate in a way which does not allow third parties to read your messages. For more information, there is a PGP/PEM FAQ.

5.4) Can I have my server use multiple names?

Yes, you can -- one of the new features of HTTPd 1.5 is a VirtualHost directive which implements just this. Be aware, though, that any names you use must be valid Domain Name Server entries. For more information, see the VirtualHost tutorial.


[Back] Return to the Overview
NCSA HTTPd Development Team / httpd@ncsa.uiuc.edu / Last Modified 02-29-96