From: Rich Bowen Date: Wed, 15 Apr 2026 13:27:23 +0000 (+0000) Subject: Style guide: Replace 'Apache' with 'Apache HTTP Server', 'Apache httpd', X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=981bc16be94f4388e85f401e77e8ed77b0515aa6;p=thirdparty%2Fapache%2Fhttpd.git Style guide: Replace 'Apache' with 'Apache HTTP Server', 'Apache httpd', or 'httpd', depending on context. Note, however, that this guide is grossly out of date, and needs a major revision. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933084 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/howto/cgi.xml b/docs/manual/howto/cgi.xml index fe2be67d89..25fa99032c 100644 --- a/docs/manual/howto/cgi.xml +++ b/docs/manual/howto/cgi.xml @@ -23,7 +23,7 @@ How-To / Tutorials - Apache Tutorial: Dynamic Content with CGI + Apache HTTP Server Tutorial: Dynamic Content with CGI
Introduction @@ -48,18 +48,18 @@ is a simple way to put dynamic content on your web site, using whatever programming language you're most familiar with. This document will be an introduction to setting - up CGI on your Apache web server, and getting started writing + up CGI on your httpd web server, and getting started writing CGI programs.

- Configuring Apache to permit CGI + Configuring httpd to permit CGI

In order to get your CGI programs to work properly, you'll - need to have Apache configured to permit CGI execution. There + need to have httpd configured to permit CGI execution. There are several ways to do this.

- Note: If Apache has been built with shared module + Note: If httpd has been built with shared module support you need to ensure that the module is loaded; in your httpd.conf you need to make sure the LoadModule @@ -85,8 +85,8 @@

The ScriptAlias - directive tells Apache that a particular directory is set - aside for CGI programs. Apache will assume that every file in + directive tells httpd that a particular directory is set + aside for CGI programs. httpd will assume that every file in this directory is a CGI program, and will attempt to execute it, when that particular resource is requested by a client.

@@ -99,7 +99,7 @@ ScriptAlias "/cgi-bin/" "/usr/local/apache2/cgi-bin/"

The example shown is from your default httpd.conf - configuration file, if you installed Apache in the default + configuration file, if you installed httpd in the default location. The ScriptAlias directive is much like the Alias directive, which defines a URL prefix that @@ -110,18 +110,18 @@ ScriptAlias "/cgi-bin/" "/usr/local/apache2/cgi-bin/" Alias and ScriptAlias is that ScriptAlias has the added meaning that everything under that URL prefix will be considered a CGI - program. So, the example above tells Apache that any request for a + program. So, the example above tells httpd that any request for a resource beginning with /cgi-bin/ should be served from the directory /usr/local/apache2/cgi-bin/, and should be treated as a CGI program.

For example, if the URL http://www.example.com/cgi-bin/test.pl - is requested, Apache will attempt to execute the file + is requested, httpd will attempt to execute the file /usr/local/apache2/cgi-bin/test.pl and return the output. Of course, the file will have to exist, and be executable, and return output in a particular - way, or Apache will return an error message.

+ way, or httpd will return an error message.

@@ -162,7 +162,7 @@ ScriptAlias "/cgi-bin/" "/usr/local/apache2/cgi-bin/" </Directory> -

The above directive tells Apache to permit the execution +

The above directive tells httpd to permit the execution of CGI files. You will also need to tell the server what files are CGI files. The following AddHandler directive tells the server to treat all @@ -250,7 +250,7 @@ print "Hello, World.";

Even if you are not familiar with Perl, you should be able - to see what is happening here. The first line tells Apache + to see what is happening here. The first line tells httpd (or whatever shell you happen to be running under) that this program can be executed by feeding the file to the interpreter found at the location /usr/bin/perl. @@ -289,19 +289,19 @@ print "Hello, World.";

The source code of your CGI program or a "POST Method Not Allowed" message
-
That means that you have not properly configured Apache +
That means that you have not properly configured httpd to process your CGI program. Reread the section on configuring - Apache and try to find what you missed.
+ httpd and try to find what you missed.
A message starting with "Forbidden"
That means that there is a permissions problem. Check the - Apache error log and the section below on + httpd error log and the section below on file permissions.
A message saying "Internal Server Error"
If you check the - Apache error log, you will probably + httpd error log, you will probably find that it says "Premature end of script headers", possibly along with an error message generated by your CGI program. In this case, you will want to @@ -372,7 +372,7 @@ print "Hello, World.";

If your CGI program depends on non-standard environment variables, you will need to - assure that those variables are passed by Apache.

+ assure that those variables are passed by httpd.

When you miss HTTP headers from the environment, make sure they are formatted according to @@ -399,13 +399,13 @@ print "Hello, World.";

(Do not call the perl interpreter. The shell - and Apache should find the interpreter using the path information on the first line of the script.)

The first thing you see written by your program should be a set of HTTP headers, including the Content-Type, - followed by a blank line. If you see anything else, Apache will + followed by a blank line. If you see anything else, httpd will return the Premature end of script headers error if you try to run it through the server. See Writing a CGI program above for more @@ -436,7 +436,7 @@ print "Hello, World.";

To check if you are using suexec, run apachectl -V and check for the location of SUEXEC_BIN. - If Apache finds an suexec binary there on startup, + If httpd finds an suexec binary there on startup, suexec will be activated.

Unless you fully understand suexec, you should not be using it. @@ -473,7 +473,7 @@ print "Hello, World.";

During the CGI transaction, the server and the browser also set environment variables, so that they can communicate with one another. These are things like the browser type - (Netscape, IE, Lynx), the server type (Apache, IIS, WebSite), + (Chrome, Firefox, Lynx), the server type (Apache httpd, Nginx, IIS), the name of the CGI program that is being run, and so on.

These variables are available to the CGI programmer, and @@ -487,10 +487,10 @@ print "Hello, World."; similar programs are included in the cgi-bin - directory of the Apache distribution. Note that some + directory of the httpd distribution. Note that some variables are required, while others are optional, so you may see some variables listed that were not in the official list. - In addition, Apache provides many different ways for you to + In addition, httpd provides many different ways for you to add your own environment variables to the basic ones provided by default.

@@ -584,7 +584,7 @@ foreach my $key (keys %ENV) { make finding your problem much simpler.

Note that questions about CGI problems should never - be posted to the Apache bug database unless you are sure you - have found a problem in the Apache source code.

+ be posted to the httpd bug database unless you are sure you + have found a problem in the httpd source code.