You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by hu...@apache.org on 2012/04/25 15:43:44 UTC

svn commit: r1330291 - in /httpd/httpd/trunk/docs/manual/misc: perf-tuning.html.en perf-tuning.xml security_tips.html.en security_tips.xml

Author: humbedooh
Date: Wed Apr 25 13:43:43 2012
New Revision: 1330291

URL: http://svn.apache.org/viewvc?rev=1330291&view=rev
Log:
highlight config in misc/

Modified:
    httpd/httpd/trunk/docs/manual/misc/perf-tuning.html.en
    httpd/httpd/trunk/docs/manual/misc/perf-tuning.xml
    httpd/httpd/trunk/docs/manual/misc/security_tips.html.en
    httpd/httpd/trunk/docs/manual/misc/security_tips.xml

Modified: httpd/httpd/trunk/docs/manual/misc/perf-tuning.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/misc/perf-tuning.html.en?rev=1330291&r1=1330290&r2=1330291&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/misc/perf-tuning.html.en (original)
+++ httpd/httpd/trunk/docs/manual/misc/perf-tuning.html.en Wed Apr 25 13:43:43 2012
@@ -137,14 +137,13 @@
       matching the criteria. Here's an example which disables lookups
       except for <code>.html</code> and <code>.cgi</code> files:</p>
 
-      <div class="example"><p><code>
-        HostnameLookups off<br />
-        &lt;Files ~ "\.(html|cgi)$"&gt;<br />
-        <span class="indent">
-          HostnameLookups on<br />
-        </span>
-        &lt;/Files&gt;
-      </code></p></div>
+      <pre class="prettyprint lang-config">
+HostnameLookups off
+&lt;Files ~ "\.(html|cgi)$"&gt;
+  HostnameLookups on
+&lt;/Files&gt;
+      </pre>
+
 
       <p>But even still, if you just need DNS names in some CGIs you
       could consider doing the <code>gethostbyname</code> call in the
@@ -162,14 +161,13 @@
       system calls to check up on symlinks. One extra call per
       filename component. For example, if you had:</p>
 
-      <div class="example"><p><code>
-        DocumentRoot /www/htdocs<br />
-        &lt;Directory /&gt;<br />
-        <span class="indent">
-          Options SymLinksIfOwnerMatch<br />
-        </span>
-        &lt;/Directory&gt;
-      </code></p></div>
+      <pre class="prettyprint lang-config">
+DocumentRoot /www/htdocs
+&lt;Directory /&gt;
+  Options SymLinksIfOwnerMatch
+&lt;/Directory&gt;
+      </pre>
+
 
       <p>and a request is made for the URI <code>/index.html</code>.
       Then Apache will perform <code>lstat(2)</code> on
@@ -179,20 +177,17 @@
       every single request. If you really desire the symlinks
       security checking you can do something like this:</p>
 
-      <div class="example"><p><code>
-        DocumentRoot /www/htdocs<br />
-        &lt;Directory /&gt;<br />
-        <span class="indent">
-          Options FollowSymLinks<br />
-        </span>
-        &lt;/Directory&gt;<br />
-        <br />
-        &lt;Directory /www/htdocs&gt;<br />
-        <span class="indent">
-          Options -FollowSymLinks +SymLinksIfOwnerMatch<br />
-        </span>
-        &lt;/Directory&gt;
-      </code></p></div>
+      <pre class="prettyprint lang-config">
+DocumentRoot /www/htdocs
+&lt;Directory /&gt;
+  Options FollowSymLinks
+&lt;/Directory&gt;
+
+&lt;Directory /www/htdocs&gt;
+  Options -FollowSymLinks +SymLinksIfOwnerMatch
+&lt;/Directory&gt;
+      </pre>
+
 
       <p>This at least avoids the extra checks for the
       <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> path.
@@ -214,14 +209,13 @@
       <code>.htaccess</code> for each filename component. For
       example,</p>
 
-      <div class="example"><p><code>
-        DocumentRoot /www/htdocs<br />
-        &lt;Directory /&gt;<br />
-        <span class="indent">
-          AllowOverride all<br />
-        </span>
-        &lt;/Directory&gt;
-      </code></p></div>
+      <pre class="prettyprint lang-config">
+DocumentRoot /www/htdocs
+&lt;Directory /&gt;
+  AllowOverride all
+&lt;/Directory&gt;
+      </pre>
+
 
       <p>and a request is made for the URI <code>/index.html</code>.
       Then Apache will attempt to open <code>/.htaccess</code>,
@@ -243,15 +237,13 @@
       penalties. There's one case where you can speed up the server.
       Instead of using a wildcard such as:</p>
 
-      <div class="example"><p><code>
-        DirectoryIndex index
-      </code></p></div>
+      <pre class="prettyprint lang-config">DirectoryIndex index</pre>
+
 
       <p>Use a complete list of options:</p>
 
-      <div class="example"><p><code>
-        DirectoryIndex index.cgi index.pl index.shtml index.html
-      </code></p></div>
+      <pre class="prettyprint lang-config">DirectoryIndex index.cgi index.pl index.shtml index.html</pre>
+
 
       <p>where you list the most common choice first.</p>
 
@@ -559,39 +551,30 @@
       do not match the code, they're contrived for pedagogical
       purposes):</p>
 
-      <div class="example"><p><code>
-        for (;;) {<br />
-        <span class="indent">
-          for (;;) {<br />
-          <span class="indent">
-            fd_set accept_fds;<br />
-            <br />
-            FD_ZERO (&amp;accept_fds);<br />
-            for (i = first_socket; i &lt;= last_socket; ++i) {<br />
-            <span class="indent">
-              FD_SET (i, &amp;accept_fds);<br />
-            </span>
-            }<br />
-            rc = select (last_socket+1, &amp;accept_fds, NULL, NULL, NULL);<br />
-            if (rc &lt; 1) continue;<br />
-            new_connection = -1;<br />
-            for (i = first_socket; i &lt;= last_socket; ++i) {<br />
-            <span class="indent">
-              if (FD_ISSET (i, &amp;accept_fds)) {<br />
-              <span class="indent">
-                new_connection = accept (i, NULL, NULL);<br />
-                if (new_connection != -1) break;<br />
-              </span>
-              }<br />
-            </span>
-            }<br />
-            if (new_connection != -1) break;<br />
-          </span>
-          }<br />
-          process the new_connection;<br />
-        </span>
+      <pre class="prettyprint lang-c">
+        for (;;) {
+          for (;;) {
+            fd_set accept_fds;
+
+            FD_ZERO (&amp;accept_fds);
+            for (i = first_socket; i &lt;= last_socket; ++i) {
+              FD_SET (i, &amp;accept_fds);
+            }
+            rc = select (last_socket+1, &amp;accept_fds, NULL, NULL, NULL);
+            if (rc &lt; 1) continue;
+            new_connection = -1;
+            for (i = first_socket; i &lt;= last_socket; ++i) {
+              if (FD_ISSET (i, &amp;accept_fds)) {
+                new_connection = accept (i, NULL, NULL);
+                if (new_connection != -1) break;
+              }
+            }
+            if (new_connection != -1) break;
+          }
+          process_the(new_connection);
         }
-      </code></p></div>
+      </pre>
+
 
       <p>But this naive implementation has a serious starvation problem.
       Recall that multiple children execute this loop at the same
@@ -629,41 +612,32 @@
       entry into the inner loop. The loop looks like this
       (differences highlighted):</p>
 
-      <div class="example"><p><code>
-        for (;;) {<br />
-        <span class="indent">
-          <strong>accept_mutex_on ();</strong><br />
-          for (;;) {<br />
-          <span class="indent">
-            fd_set accept_fds;<br />
-            <br />
-            FD_ZERO (&amp;accept_fds);<br />
-            for (i = first_socket; i &lt;= last_socket; ++i) {<br />
-            <span class="indent">
-              FD_SET (i, &amp;accept_fds);<br />
-            </span>
-            }<br />
-            rc = select (last_socket+1, &amp;accept_fds, NULL, NULL, NULL);<br />
-            if (rc &lt; 1) continue;<br />
-            new_connection = -1;<br />
-            for (i = first_socket; i &lt;= last_socket; ++i) {<br />
-            <span class="indent">
-              if (FD_ISSET (i, &amp;accept_fds)) {<br />
-              <span class="indent">
-                new_connection = accept (i, NULL, NULL);<br />
-                if (new_connection != -1) break;<br />
-              </span>
-              }<br />
-            </span>
-            }<br />
-            if (new_connection != -1) break;<br />
-          </span>
-          }<br />
-          <strong>accept_mutex_off ();</strong><br />
-          process the new_connection;<br />
-        </span>
+      <pre class="prettyprint lang-c">
+        for (;;) {
+          <strong>accept_mutex_on ();</strong>
+          for (;;) {
+            fd_set accept_fds;
+            
+            FD_ZERO (&amp;accept_fds);
+            for (i = first_socket; i &lt;= last_socket; ++i) {
+              FD_SET (i, &amp;accept_fds);
+            }
+            rc = select (last_socket+1, &amp;accept_fds, NULL, NULL, NULL);
+            if (rc &lt; 1) continue;
+            new_connection = -1;
+            for (i = first_socket; i &lt;= last_socket; ++i) {
+              if (FD_ISSET (i, &amp;accept_fds)) {
+                new_connection = accept (i, NULL, NULL);
+                if (new_connection != -1) break;
+              }
+            }
+            if (new_connection != -1) break;
+          }
+          <strong>accept_mutex_off ();</strong>
+          process the new_connection;
         }
-      </code></p></div>
+      </pre>
+
 
       <p><a id="serialize" name="serialize">The functions</a>
       <code>accept_mutex_on</code> and <code>accept_mutex_off</code>
@@ -771,39 +745,32 @@
       <code>http_main.c</code>). The function looks roughly like
       this:</p>
 
-      <div class="example"><p><code>
-        void lingering_close (int s)<br />
-        {<br />
-        <span class="indent">
-          char junk_buffer[2048];<br />
-          <br />
-          /* shutdown the sending side */<br />
-          shutdown (s, 1);<br />
-          <br />
-          signal (SIGALRM, lingering_death);<br />
-          alarm (30);<br />
-          <br />
-          for (;;) {<br />
-          <span class="indent">
-            select (s for reading, 2 second timeout);<br />
-            if (error) break;<br />
-            if (s is ready for reading) {<br />
-            <span class="indent">
-              if (read (s, junk_buffer, sizeof (junk_buffer)) &lt;= 0) {<br />
-              <span class="indent">
-                break;<br />
-              </span>
-              }<br />
-              /* just toss away whatever is here */<br />
-            </span>
-            }<br />
-          </span>
-          }<br />
-          <br />
-          close (s);<br />
-        </span>
+      <pre class="prettyprint lang-c">
+        void lingering_close (int s)
+        {
+          char junk_buffer[2048];
+          
+          /* shutdown the sending side */
+          shutdown (s, 1);
+
+          signal (SIGALRM, lingering_death);
+          alarm (30);
+
+          for (;;) {
+            select (s for reading, 2 second timeout);
+            if (error) break;
+            if (s is ready for reading) {
+              if (read (s, junk_buffer, sizeof (junk_buffer)) &lt;= 0) {
+                break;
+              }
+              /* just toss away whatever is here */
+            }
+          }
+          
+          close (s);
         }
-      </code></p></div>
+      </pre>
+
 
       <p>This naturally adds some expense at the end of a connection,
       but it is required for a reliable implementation. As HTTP/1.1

Modified: httpd/httpd/trunk/docs/manual/misc/perf-tuning.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/misc/perf-tuning.xml?rev=1330291&r1=1330290&r2=1330291&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/misc/perf-tuning.xml (original)
+++ httpd/httpd/trunk/docs/manual/misc/perf-tuning.xml Wed Apr 25 13:43:43 2012
@@ -152,14 +152,12 @@
       matching the criteria. Here's an example which disables lookups
       except for <code>.html</code> and <code>.cgi</code> files:</p>
 
-      <example>
-        HostnameLookups off<br />
-        &lt;Files ~ "\.(html|cgi)$"&gt;<br />
-        <indent>
-          HostnameLookups on<br />
-        </indent>
-        &lt;/Files&gt;
-      </example>
+      <highlight language="config">
+HostnameLookups off
+&lt;Files ~ "\.(html|cgi)$"&gt;
+  HostnameLookups on
+&lt;/Files&gt;
+      </highlight>
 
       <p>But even still, if you just need DNS names in some CGIs you
       could consider doing the <code>gethostbyname</code> call in the
@@ -177,14 +175,12 @@
       system calls to check up on symlinks. One extra call per
       filename component. For example, if you had:</p>
 
-      <example>
-        DocumentRoot /www/htdocs<br />
-        &lt;Directory /&gt;<br />
-        <indent>
-          Options SymLinksIfOwnerMatch<br />
-        </indent>
-        &lt;/Directory&gt;
-      </example>
+      <highlight language="config">
+DocumentRoot /www/htdocs
+&lt;Directory /&gt;
+  Options SymLinksIfOwnerMatch
+&lt;/Directory&gt;
+      </highlight>
 
       <p>and a request is made for the URI <code>/index.html</code>.
       Then Apache will perform <code>lstat(2)</code> on
@@ -194,20 +190,16 @@
       every single request. If you really desire the symlinks
       security checking you can do something like this:</p>
 
-      <example>
-        DocumentRoot /www/htdocs<br />
-        &lt;Directory /&gt;<br />
-        <indent>
-          Options FollowSymLinks<br />
-        </indent>
-        &lt;/Directory&gt;<br />
-        <br />
-        &lt;Directory /www/htdocs&gt;<br />
-        <indent>
-          Options -FollowSymLinks +SymLinksIfOwnerMatch<br />
-        </indent>
-        &lt;/Directory&gt;
-      </example>
+      <highlight language="config">
+DocumentRoot /www/htdocs
+&lt;Directory /&gt;
+  Options FollowSymLinks
+&lt;/Directory&gt;
+
+&lt;Directory /www/htdocs&gt;
+  Options -FollowSymLinks +SymLinksIfOwnerMatch
+&lt;/Directory&gt;
+      </highlight>
 
       <p>This at least avoids the extra checks for the
       <directive module="core">DocumentRoot</directive> path.
@@ -229,14 +221,12 @@
       <code>.htaccess</code> for each filename component. For
       example,</p>
 
-      <example>
-        DocumentRoot /www/htdocs<br />
-        &lt;Directory /&gt;<br />
-        <indent>
-          AllowOverride all<br />
-        </indent>
-        &lt;/Directory&gt;
-      </example>
+      <highlight language="config">
+DocumentRoot /www/htdocs
+&lt;Directory /&gt;
+  AllowOverride all
+&lt;/Directory&gt;
+      </highlight>
 
       <p>and a request is made for the URI <code>/index.html</code>.
       Then Apache will attempt to open <code>/.htaccess</code>,
@@ -258,15 +248,11 @@
       penalties. There's one case where you can speed up the server.
       Instead of using a wildcard such as:</p>
 
-      <example>
-        DirectoryIndex index
-      </example>
+      <highlight language="config">DirectoryIndex index</highlight>
 
       <p>Use a complete list of options:</p>
 
-      <example>
-        DirectoryIndex index.cgi index.pl index.shtml index.html
-      </example>
+      <highlight language="config">DirectoryIndex index.cgi index.pl index.shtml index.html</highlight>
 
       <p>where you list the most common choice first.</p>
 
@@ -586,39 +572,29 @@
       do not match the code, they're contrived for pedagogical
       purposes):</p>
 
-      <example>
-        for (;;) {<br />
-        <indent>
-          for (;;) {<br />
-          <indent>
-            fd_set accept_fds;<br />
-            <br />
-            FD_ZERO (&amp;accept_fds);<br />
-            for (i = first_socket; i &lt;= last_socket; ++i) {<br />
-            <indent>
-              FD_SET (i, &amp;accept_fds);<br />
-            </indent>
-            }<br />
-            rc = select (last_socket+1, &amp;accept_fds, NULL, NULL, NULL);<br />
-            if (rc &lt; 1) continue;<br />
-            new_connection = -1;<br />
-            for (i = first_socket; i &lt;= last_socket; ++i) {<br />
-            <indent>
-              if (FD_ISSET (i, &amp;accept_fds)) {<br />
-              <indent>
-                new_connection = accept (i, NULL, NULL);<br />
-                if (new_connection != -1) break;<br />
-              </indent>
-              }<br />
-            </indent>
-            }<br />
-            if (new_connection != -1) break;<br />
-          </indent>
-          }<br />
-          process the new_connection;<br />
-        </indent>
+      <highlight language="c">
+        for (;;) {
+          for (;;) {
+            fd_set accept_fds;
+
+            FD_ZERO (&amp;accept_fds);
+            for (i = first_socket; i &lt;= last_socket; ++i) {
+              FD_SET (i, &amp;accept_fds);
+            }
+            rc = select (last_socket+1, &amp;accept_fds, NULL, NULL, NULL);
+            if (rc &lt; 1) continue;
+            new_connection = -1;
+            for (i = first_socket; i &lt;= last_socket; ++i) {
+              if (FD_ISSET (i, &amp;accept_fds)) {
+                new_connection = accept (i, NULL, NULL);
+                if (new_connection != -1) break;
+              }
+            }
+            if (new_connection != -1) break;
+          }
+          process_the(new_connection);
         }
-      </example>
+      </highlight>
 
       <p>But this naive implementation has a serious starvation problem.
       Recall that multiple children execute this loop at the same
@@ -657,41 +633,31 @@
       entry into the inner loop. The loop looks like this
       (differences highlighted):</p>
 
-      <example>
-        for (;;) {<br />
-        <indent>
-          <strong>accept_mutex_on ();</strong><br />
-          for (;;) {<br />
-          <indent>
-            fd_set accept_fds;<br />
-            <br />
-            FD_ZERO (&amp;accept_fds);<br />
-            for (i = first_socket; i &lt;= last_socket; ++i) {<br />
-            <indent>
-              FD_SET (i, &amp;accept_fds);<br />
-            </indent>
-            }<br />
-            rc = select (last_socket+1, &amp;accept_fds, NULL, NULL, NULL);<br />
-            if (rc &lt; 1) continue;<br />
-            new_connection = -1;<br />
-            for (i = first_socket; i &lt;= last_socket; ++i) {<br />
-            <indent>
-              if (FD_ISSET (i, &amp;accept_fds)) {<br />
-              <indent>
-                new_connection = accept (i, NULL, NULL);<br />
-                if (new_connection != -1) break;<br />
-              </indent>
-              }<br />
-            </indent>
-            }<br />
-            if (new_connection != -1) break;<br />
-          </indent>
-          }<br />
-          <strong>accept_mutex_off ();</strong><br />
-          process the new_connection;<br />
-        </indent>
+      <highlight language="c">
+        for (;;) {
+          <strong>accept_mutex_on ();</strong>
+          for (;;) {
+            fd_set accept_fds;
+            
+            FD_ZERO (&amp;accept_fds);
+            for (i = first_socket; i &lt;= last_socket; ++i) {
+              FD_SET (i, &amp;accept_fds);
+            }
+            rc = select (last_socket+1, &amp;accept_fds, NULL, NULL, NULL);
+            if (rc &lt; 1) continue;
+            new_connection = -1;
+            for (i = first_socket; i &lt;= last_socket; ++i) {
+              if (FD_ISSET (i, &amp;accept_fds)) {
+                new_connection = accept (i, NULL, NULL);
+                if (new_connection != -1) break;
+              }
+            }
+            if (new_connection != -1) break;
+          }
+          <strong>accept_mutex_off ();</strong>
+          process the new_connection;
         }
-      </example>
+      </highlight>
 
       <p><a id="serialize" name="serialize">The functions</a>
       <code>accept_mutex_on</code> and <code>accept_mutex_off</code>
@@ -800,39 +766,31 @@
       <code>http_main.c</code>). The function looks roughly like
       this:</p>
 
-      <example>
-        void lingering_close (int s)<br />
-        {<br />
-        <indent>
-          char junk_buffer[2048];<br />
-          <br />
-          /* shutdown the sending side */<br />
-          shutdown (s, 1);<br />
-          <br />
-          signal (SIGALRM, lingering_death);<br />
-          alarm (30);<br />
-          <br />
-          for (;;) {<br />
-          <indent>
-            select (s for reading, 2 second timeout);<br />
-            if (error) break;<br />
-            if (s is ready for reading) {<br />
-            <indent>
-              if (read (s, junk_buffer, sizeof (junk_buffer)) &lt;= 0) {<br />
-              <indent>
-                break;<br />
-              </indent>
-              }<br />
-              /* just toss away whatever is here */<br />
-            </indent>
-            }<br />
-          </indent>
-          }<br />
-          <br />
-          close (s);<br />
-        </indent>
+      <highlight language="c">
+        void lingering_close (int s)
+        {
+          char junk_buffer[2048];
+          
+          /* shutdown the sending side */
+          shutdown (s, 1);
+
+          signal (SIGALRM, lingering_death);
+          alarm (30);
+
+          for (;;) {
+            select (s for reading, 2 second timeout);
+            if (error) break;
+            if (s is ready for reading) {
+              if (read (s, junk_buffer, sizeof (junk_buffer)) &lt;= 0) {
+                break;
+              }
+              /* just toss away whatever is here */
+            }
+          }
+          
+          close (s);
         }
-      </example>
+      </highlight>
 
       <p>This naturally adds some expense at the end of a connection,
       but it is required for a reliable implementation. As HTTP/1.1

Modified: httpd/httpd/trunk/docs/manual/misc/security_tips.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/misc/security_tips.html.en?rev=1330291&r1=1330290&r2=1330291&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/misc/security_tips.html.en (original)
+++ httpd/httpd/trunk/docs/manual/misc/security_tips.html.en Wed Apr 25 13:43:43 2012
@@ -334,11 +334,12 @@
 
     <p>In the server configuration file, put</p>
 
-    <div class="example"><p><code>
-      &lt;Directory /&gt; <br />
-        AllowOverride None <br />
+    <pre class="prettyprint lang-config">
+      &lt;Directory /&gt;
+        AllowOverride None
       &lt;/Directory&gt;
-    </code></p></div>
+    </pre>
+
 
     <p>This prevents the use of <code>.htaccess</code> files in all
     directories apart from those specifically enabled.</p>
@@ -365,27 +366,29 @@
     work around this, add the following block to your server's
     configuration:</p>
 
-    <div class="example"><p><code>
-      &lt;Directory /&gt; <br />
-      Order Deny,Allow <br />
-      Deny from all <br />
+    <pre class="prettyprint lang-config">
+      &lt;Directory /&gt;
+      Order Deny,Allow
+      Deny from all
       &lt;/Directory&gt;
-    </code></p></div>
+    </pre>
+
 
     <p>This will forbid default access to filesystem locations. Add
     appropriate <code class="directive"><a href="../mod/core.html#directory">Directory</a></code> blocks to
     allow access only in those areas you wish. For example,</p>
 
-    <div class="example"><p><code>
-      &lt;Directory /usr/users/*/public_html&gt; <br />
-        Order Deny,Allow <br />
-        Allow from all <br />
-      &lt;/Directory&gt; <br />
-      &lt;Directory /usr/local/httpd&gt; <br />
-        Order Deny,Allow <br />
-        Allow from all <br />
+    <pre class="prettyprint lang-config">
+      &lt;Directory /usr/users/*/public_html&gt;
+        Order Deny,Allow
+        Allow from all
       &lt;/Directory&gt;
-    </code></p></div>
+      &lt;Directory /usr/local/httpd&gt;
+        Order Deny,Allow
+        Allow from all
+      &lt;/Directory&gt;
+    </pre>
+
 
     <p>Pay particular attention to the interactions of <code class="directive"><a href="../mod/core.html#location">Location</a></code> and <code class="directive"><a href="../mod/core.html#directory">Directory</a></code> directives; for instance, even
     if <code>&lt;Directory /&gt;</code> denies access, a <code>
@@ -397,9 +400,8 @@
     recommend that you include the following line in your server
     configuration files:</p>
 
-    <div class="example"><p><code>
-      UserDir disabled root
-    </code></p></div>
+    <pre class="prettyprint lang-config">UserDir disabled root</pre>
+
 
   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="section">
@@ -442,12 +444,13 @@
     you probably commented out the following in your server configuration
     file:</p>
 
-    <div class="example"><p><code>
-      &lt;Files ".ht*"&gt; <br />
-        Order allow,deny <br />
-        Deny from all <br />
+    <pre class="prettyprint lang-config">
+      &lt;Files ".ht*"&gt;
+        Order allow,deny
+        Deny from all
       &lt;/Files&gt;
-    </code></p></div>
+    </pre>
+
 
   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="section">

Modified: httpd/httpd/trunk/docs/manual/misc/security_tips.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/misc/security_tips.xml?rev=1330291&r1=1330290&r2=1330291&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/misc/security_tips.xml (original)
+++ httpd/httpd/trunk/docs/manual/misc/security_tips.xml Wed Apr 25 13:43:43 2012
@@ -327,11 +327,11 @@
 
     <p>In the server configuration file, put</p>
 
-    <example>
-      &lt;Directory /&gt; <br />
-        AllowOverride None <br />
+    <highlight language="config">
+      &lt;Directory /&gt;
+        AllowOverride None
       &lt;/Directory&gt;
-    </example>
+    </highlight>
 
     <p>This prevents the use of <code>.htaccess</code> files in all
     directories apart from those specifically enabled.</p>
@@ -358,27 +358,27 @@
     work around this, add the following block to your server's
     configuration:</p>
 
-    <example>
-      &lt;Directory /&gt; <br />
-      Order Deny,Allow <br />
-      Deny from all <br />
+    <highlight language="config">
+      &lt;Directory /&gt;
+      Order Deny,Allow
+      Deny from all
       &lt;/Directory&gt;
-    </example>
+    </highlight>
 
     <p>This will forbid default access to filesystem locations. Add
     appropriate <directive module="core">Directory</directive> blocks to
     allow access only in those areas you wish. For example,</p>
 
-    <example>
-      &lt;Directory /usr/users/*/public_html&gt; <br />
-        Order Deny,Allow <br />
-        Allow from all <br />
-      &lt;/Directory&gt; <br />
-      &lt;Directory /usr/local/httpd&gt; <br />
-        Order Deny,Allow <br />
-        Allow from all <br />
+    <highlight language="config">
+      &lt;Directory /usr/users/*/public_html&gt;
+        Order Deny,Allow
+        Allow from all
       &lt;/Directory&gt;
-    </example>
+      &lt;Directory /usr/local/httpd&gt;
+        Order Deny,Allow
+        Allow from all
+      &lt;/Directory&gt;
+    </highlight>
 
     <p>Pay particular attention to the interactions of <directive
     module="core">Location</directive> and <directive
@@ -393,9 +393,7 @@
     recommend that you include the following line in your server
     configuration files:</p>
 
-    <example>
-      UserDir disabled root
-    </example>
+    <highlight language="config">UserDir disabled root</highlight>
 
   </section>
 
@@ -438,12 +436,12 @@
     you probably commented out the following in your server configuration
     file:</p>
 
-    <example>
-      &lt;Files ".ht*"&gt; <br />
-        Order allow,deny <br />
-        Deny from all <br />
+    <highlight language="config">
+      &lt;Files ".ht*"&gt;
+        Order allow,deny
+        Deny from all
       &lt;/Files&gt;
-    </example>
+    </highlight>
 
   </section>