diff options
author | Daniel Gruno <humbedooh@apache.org> | 2012-04-25 15:43:43 +0200 |
---|---|---|
committer | Daniel Gruno <humbedooh@apache.org> | 2012-04-25 15:43:43 +0200 |
commit | bf7cc0553f96d0c54d20e28627704234eee925e3 (patch) | |
tree | 24fe9894efb799d6519133c0116c7ffc747dd0d4 /docs/manual/misc/security_tips.html.en | |
parent | add LastChangedRevision as svn properties as well (diff) | |
download | apache2-bf7cc0553f96d0c54d20e28627704234eee925e3.tar.xz apache2-bf7cc0553f96d0c54d20e28627704234eee925e3.zip |
highlight config in misc/
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1330291 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/misc/security_tips.html.en')
-rw-r--r-- | docs/manual/misc/security_tips.html.en | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/docs/manual/misc/security_tips.html.en b/docs/manual/misc/security_tips.html.en index baf4b279e6..1a5ec0a057 100644 --- a/docs/manual/misc/security_tips.html.en +++ b/docs/manual/misc/security_tips.html.en @@ -334,11 +334,12 @@ <p>In the server configuration file, put</p> - <div class="example"><p><code> - <Directory /> <br /> - AllowOverride None <br /> + <pre class="prettyprint lang-config"> + <Directory /> + AllowOverride None </Directory> - </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> - <Directory /> <br /> - Order Deny,Allow <br /> - Deny from all <br /> + <pre class="prettyprint lang-config"> + <Directory /> + Order Deny,Allow + Deny from all </Directory> - </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> - <Directory /usr/users/*/public_html> <br /> - Order Deny,Allow <br /> - Allow from all <br /> - </Directory> <br /> - <Directory /usr/local/httpd> <br /> - Order Deny,Allow <br /> - Allow from all <br /> + <pre class="prettyprint lang-config"> + <Directory /usr/users/*/public_html> + Order Deny,Allow + Allow from all </Directory> - </code></p></div> + <Directory /usr/local/httpd> + Order Deny,Allow + Allow from all + </Directory> + </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><Directory /></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> - <Files ".ht*"> <br /> - Order allow,deny <br /> - Deny from all <br /> + <pre class="prettyprint lang-config"> + <Files ".ht*"> + Order allow,deny + Deny from all </Files> - </code></p></div> + </pre> + </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> <div class="section"> |