httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Httpd Wiki] Update of "FAQ" by jmcg
Date Fri, 10 Dec 2010 16:14:02 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change notification.

The "FAQ" page has been changed by jmcg.
The comment on this change is: Fixing mod_include outdated untruthiness.


  == Why do I keep getting "Method Not Allowed" for form POST requests? ==
  This is almost always due to Apache not being configured to treat the file you are trying
to POST to as a CGI script. You can not POST to a normal HTML file; the operation has no meaning.
See the FAQ entry on CGIs outside ScriptAliased directories for details on how to configure
Apache to treat the file in question as a CGI.
- == How can I get my script's output without Apache buffering it? Why doesn't my server push
work? ==
- CGI scripts are essentially not buffered. Every time your script does a "flush" to output
data, that data gets relayed on to the client. Some scripting languages, for example Perl,
have their own buffering for output - this can be disabled by setting the $| special variable
to 1. Of course this does increase the overall number of packets being transmitted, which
can result in a sense of slowness for the end user.
- (Prior to 1.3, you needed to use "nph-" scripts to accomplish non-buffering. Today, the
only difference between nph scripts and normal scripts is that nph scripts require the full
HTTP headers to be sent.)
- == Where can I find the "CGI specification"? ==
- The Common Gateway Interface (CGI) specification can no longer be found at the original
NCSA site ( This version hadn't been updated
since 1995, and there have been some efforts to update it.
- A new draft is being worked on with the intent of making it an informational RFC; you can
find out more about this project at <>.
  == How do I enable SSI (parsed HTML)? ==
  SSI (an acronym for Server-Side Include) directives allow static HTML documents to be enhanced
at run-time (e.g., when delivered to a client by Apache). The format of SSI directives is
covered in the mod_include manual; suffice it to say that Apache supports not only SSI but
xSSI (eXtended SSI) directives.
@@ -490, +480 @@

   * Build your server with the mod_include module. This is normally compiled in by default.
   * Make sure your server configuration files have an Options directive which permits Includes.
-  * Make sure that the directory where you want the SSI documents to live is covered by the
"server-parsed" content handler, either explicitly or in some ancestral location. That can
be done with the following AddHandler directive:
+  * Make sure that the directory where you want the SSI documents to live is covered by the
"INCLUDEES" content filter, either explicitly or in some ancestral location. That can be done
with the following directives:
- AddHandler server-parsed .shtml
+ AddType text/html .shtml
+ AddOutputFilter INCLUDES .shtml
  This indicates that all files ending in ".shtml" in that location (or its descendants) should
be parsed. Note that using ".html" will cause all normal HTML files to be parsed, which may
put an inordinate load on your server.
- For additional information, see the [[|Apache Week
article on Using Server Side Includes]].
+ For additional information, see the [[|mod_include
  == Why don't my parsed files get cached? ==
  Since the server is performing run-time processing of your SSI directives, which may change
the content shipped to the client, it can't know at the time it starts parsing what the final
size of the result will be, or whether the parsed result will always be the same. This means
that it can't generate Content-Length or Last-Modified headers. Caches commonly work by comparing
the Last-Modified of what's in the cache with that being delivered by the server. Since the
server isn't sending that header for a parsed document, whatever's doing the caching can't
tell whether the document has changed or not - and so fetches it again to be on the safe side.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message