Text of httpd.apache.org › docs-project › style-guide.html as Styx crawled it on Nov 18, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Documentation Style Guide - The Apache HTTP Server Project

Essentials ¶ Download! About License FAQ Security Reports Source Repositories ¶ General Information Trunk 2.4 Documentation ¶ Version 2.4 Trunk (dev) Wiki Get Involved ¶ Mailing Lists Bug Reports Developer Info User Support Subprojects ¶ Docs Test Flood Modules mod_fcgid Related Projects ¶ Apache Traffic Server Apache Traffic Control Tomcat APR mod_perl Miscellaneous ¶ Contributors Thanks! Sponsorship Privacy Apache HTTP Server Documentation Style Guide ¶ This guide defines conventions for writing and editing the Apache HTTP Server documentation.

There are two main audiences for this guide: Documentation writers — how to author and mark up content. Documentation readers — how to interpret typographic conventions (see the Reader's Guide section at the end). Inline Markup ¶ <var> — User-Supplied Placeholders ¶ Use <var> for any value the user must replace with their own input. This includes placeholders in directive syntax definitions, prose descriptions of arguments, and inline references to user-supplied values. <syntax>Listen <var>port</var></syntax> <syntax>AuthUserFile <var>file-path</var></syntax> <p>Replace <var>hostname</var> with your server's FQDN.</p> Do not use <em> for placeholders.

Legacy files use <em> in this role; new and updated content should use <var> exclusively. <em> — Emphasis ¶ Use <em> only for rhetorical emphasis — drawing attention to a word or phrase in running prose. <p>The directive must appear <em>before</em> any VirtualHost blocks.</p> <p>This applies to <em>all</em> requests, not just local ones.</p> Common legitimate uses: not , must , only , all , any , before , after , e.g. , i.e. , etc.

Do not use <em> for placeholder variables (use <var> ), for keywords (use <code> ), or for strong warnings (use <strong> ). <code> — Literal Values and Inline Code ¶ Use <code> for any literal string that appears in configuration, commands, output, or protocols: Filenames and paths: <code>.htaccess</code> , <code>httpd.conf</code> HTTP methods: <code>GET</code> , <code>POST</code> Header names: <code>Content-Type</code> , <code>ETag</code> Configuration keywords: <code>On</code> , <code>Off</code> , <code>None</code> MIME types: <code>text/html</code> Environment variables: <code>PATH_INFO</code> CLI flags and arguments: <code>-k</code> , <code>graceful</code> Signal names: <code>TERM</code> , <code>USR1</code> Do not nest <strong> inside <code> .

If emphasis is needed on a code element, restructure the sentence so the emphasis is in the prose. <strong> — Strong Emphasis ¶ Use <strong> sparingly, for critical warnings or to highlight a word that the reader must not miss: <p>You should <strong>not</strong> use this in production.</p> Do not use <strong> inside <code> blocks. Do not use <strong> where <note type="warning"> would be more appropriate. <program> — Apache httpd Programs ¶ Use <program> for any executable that ships with httpd and has its own manual page: <program>httpd</program> <program>apachectl</program> <program>htpasswd</program> <program>rotatelogs</program> <program>configure</program> This generates a cross-reference link to the program's documentation.

Do not use <code> for httpd program names. <module> — Module Names ¶ Use <module> for Apache module names. This generates a cross-reference link to the module's documentation: <module>mod_rewrite</module> <module>mod_ssl</module> <module>core</module> Do not use <code> for module names. <directive> — Directive Names ¶ Use <directive> for Apache directive names. Include the module attribute when referencing a directive outside its own module's documentation: <directive module="core">ServerRoot</directive> <directive module="mpm_common">Listen</directive> Within a module's own documentation, the module attribute may be omitted: <directive>Listen</directive> For section directives, add type="section" : <directive module="core" type="section">VirtualHost</directive> <glossary> — Glossary Terms ¶ Use <glossary> for terms defined in the project glossary.

Use the ref attribute when the link target differs from the display text: <glossary>APR</glossary> <glossary ref="regex">regular expression</glossary> <glossary>MIME-type</glossary> <rfc> — RFC References ¶ Use <rfc> to link to IETF RFCs. The element content is the RFC number (digits only). The rendered output is "RFC NNNN" linked to https://www.rfc-editor.org/rfc/rfcNNNN . <rfc>7230</rfc> <rfc>9110</rfc> To link to a numbered section within an RFC, use the section attribute.

This appends #section-N to the URL: <rfc section="14.24">2616</rfc> <rfc section="4.4">2616</rfc> To link to a named anchor (appendix, named section heading, etc.), use the anchor attribute. This appends #value to the URL as-is: <rfc anchor="appendix-B">7231</rfc> <rfc anchor="name-upgrade">9110</rfc> <rfc anchor="name-content-encoding">9110</rfc> Do not use both section and anchor on the same element. Do not use <a href="..."> with rfc-editor.org URLs when the <rfc> tag can express the link.

Use <a> only for: Non-RFC resources on rfc-editor.org (e.g. the errata page, BCP documents) IETF drafts (not yet published as RFCs) Links where the display text must differ from "RFC NNNN" (though restructuring the sentence is usually preferable) Directive Syntax Definitions ¶ Placeholder Arguments ¶ Use <var> for all user-supplied arguments in <syntax> blocks: <syntax>ServerRoot <var>directory-path</var></syntax> <syntax>Timeout <var>time-interval</var>[s]</syntax> Keyword Arguments ¶ Literal keyword choices appear untagged, separated by | : <syntax>AllowOverride All|None|<var>directive-type</var> [<var>directive-type</var>] ...</syntax> <syntax>EnableSendfile On|Off</syntax> Standard Argument-Type Names ¶ Use these lowercase hyphenated names consistently in <var> tags: Name Meaning file-path Filesystem path (ServerRoot-relative if not absolute) directory-path Filesystem directory path URL-path URL path component (e.g. /images/) url Full URL filename Bare filename without directory extension File extension (e.g. .html) regex Regular expression expression ap_expr expression number Integer bytes Size in bytes seconds Time in seconds duration Time interval (may include unit suffix) hostname DNS hostname name Generic identifier value Generic value provider-name Authentication/authorization provider name env-variable Environment variable name MIME-type Media type (e.g. text/html) method HTTP method Quoting in Configuration Examples ¶ In <highlight language="config"> blocks, quote these argument types: Filesystem paths: ServerRoot "/usr/local/apache2" URLs: Redirect "/" "https://example.com/" AuthName values: AuthName "Restricted Area" Regex patterns: RewriteRule "^/old(.*)" "/new$1" Do not quote bare keywords: AllowOverride None Options FollowSymLinks Require all granted Block-Level Elements ¶ Code Examples ¶ Use <example> with a nested <highlight language="..."> block: <example> <highlight language="config"> Listen 80 Listen 8000 </highlight> </example> Valid language values: config (most common), sh , python , lua , c , perl , html .

Do not use bare <example> with <br /> for line breaks. This is a legacy pattern. Convert to <highlight> when editing such files. If an example needs a title, use <example><title> : <example> <title>2.4 configuration:</title> <highlight language="config"> Require all granted </highlight> </example> Notes and Warnings ¶ Use <note> for informational callouts: <note> <p>When you issue a restart, a syntax check is run first.</p> </note> Use <note type="warning"> for critical warnings: <note type="warning"> <p>Overlapping Listen directives will cause a fatal error.</p> </note> A <note> may contain a <title> for labeled callouts: <note><title>Mixing old and new directives</title> <p>...</p> </note> Do not use <strong>Note:</strong> in prose as a substitute for <note> .

See Also ¶ Place <seealso> elements after <summary> and before the first <section> : <seealso><a href="vhosts/">Virtual Ho

The rest of this page is on the live site.