From 2a463b3cd73c32ee9dcd508248d0194923f435f4 Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Sat, 29 Mar 2014 21:56:19 +0100 Subject: Imported Upstream version 2.4.9 --- docs/manual/howto/cgi.html.en | 50 ++++++++++++++----------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) (limited to 'docs/manual/howto/cgi.html.en') diff --git a/docs/manual/howto/cgi.html.en b/docs/manual/howto/cgi.html.en index ff227f79..46a34735 100644 --- a/docs/manual/howto/cgi.html.en +++ b/docs/manual/howto/cgi.html.en @@ -9,7 +9,7 @@ - @@ -65,9 +65,7 @@ directive has not been commented out. A correctly configured directive may look like this: -
-      LoadModule cgi_module modules/mod_cgi.so
-    
+
LoadModule cgi_module modules/mod_cgi.so

ScriptAlias

@@ -85,9 +83,7 @@

The ScriptAlias directive looks like:

-
-        ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/
-      
+
ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/

The example shown is from your default httpd.conf @@ -141,11 +137,9 @@ file, to specify that CGI execution was permitted in a particular directory:

-
-<Directory /usr/local/apache2/htdocs/somedir>
+      
<Directory /usr/local/apache2/htdocs/somedir>
     Options +ExecCGI
-</Directory>
-      
+</Directory>

The above directive tells Apache to permit the execution @@ -154,9 +148,7 @@ files with the cgi or pl extension as CGI programs:

-
-        AddHandler cgi-script .cgi .pl
-      
+
AddHandler cgi-script .cgi .pl
@@ -175,24 +167,20 @@ .cgi in users' directories, you can use the following configuration.

-
-<Directory /home/*/public_html>
+      
<Directory /home/*/public_html>
     Options +ExecCGI
     AddHandler cgi-script .cgi
-</Directory>
-      
+</Directory>

If you wish designate a cgi-bin subdirectory of a user's directory where everything will be treated as a CGI program, you can use the following.

-
-<Directory /home/*/public_html/cgi-bin>
+      
<Directory /home/*/public_html/cgi-bin>
     Options ExecCGI
     SetHandler cgi-script
-</Directory>
-      
+</Directory>
@@ -231,11 +219,9 @@ file called first.pl, and put it in your cgi-bin directory.

-
-#!/usr/bin/perl
+      
#!/usr/bin/perl
 print "Content-type: text/html\n\n";
-print "Hello, World.";
-      
+print "Hello, World.";

Even if you are not familiar with Perl, you should be able @@ -340,9 +326,7 @@ print "Hello, World."; interpreter (often perl) indicated in the first line of your CGI program, which will look something like:

-
-        #!/usr/bin/perl
-      
+
#!/usr/bin/perl

Make sure that this is in fact the path to the @@ -481,16 +465,14 @@ print "Hello, World."; add your own environment variables to the basic ones provided by default.

-
-#!/usr/bin/perl
+      
#!/usr/bin/perl
 use strict;
 use warnings;
 
 print "Content-type: text/html\n\n";
 foreach my $key (keys %ENV) {
     print "$key --> $ENV{$key}<br>";
-}
-      
+}
@@ -597,7 +579,7 @@ var comments_identifier = 'http://httpd.apache.org/docs/2.4/howto/cgi.html'; } })(window, document); //-->