http://wiki.ljackson.us/index.php?title=Apache&limit=20&action=history&feed=atom Apache - Revision history 2024-03-28T17:14:06Z Revision history for this page on the wiki MediaWiki 1.7.1 http://wiki.ljackson.us/index.php?title=Apache&diff=3527&oldid=prev Ljackson: /* Directory index forbidden by Options directive: /www/<Virtual-Host-Path-HERE>/htdocs/ */ 2020-10-12T02:53:23Z <p><span class="autocomment">Directory index forbidden by Options directive: /www/&lt;Virtual-Host-Path-HERE&gt;/htdocs/</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 02:53, 12 October 2020</td> </tr> <tr><td colspan="2" align="left"><strong>Line 63:</strong></td> <td colspan="2" align="left"><strong>Line 63:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">=== Directory index forbidden by Options directive: /www/&lt;Virtual-Host-Path-HERE&gt;/htdocs/ ===</td><td> </td><td style="background: #eee; font-size: smaller;">=== Directory index forbidden by Options directive: /www/&lt;Virtual-Host-Path-HERE&gt;/htdocs/ ===</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Previously the Apache server was configured to list files present in the root folder of any Virtual Host if a .htaccess file with the <span style="color: red; font-weight: bold;">correction </span>Options permissions was present. Presumably after an upgrade via yum at some point the addition of the following was added to the conf.d folder</td><td>+</td><td style="background: #cfc; font-size: smaller;">Previously the Apache server was configured to list files present in the root folder of any Virtual Host if a .htaccess file with the <span style="color: red; font-weight: bold;">correct </span>Options permissions was present. </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">&#160;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><span style="color: red; font-weight: bold;"> Options FollowSymLinks ExecCGI Indexes</span></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">&#160;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Presumably after an upgrade via yum at some point the addition of the following was added to the conf.d folder</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> -rw-r--r-- 1 root root 299 Oct 11 22:33 welcome.conf</td><td> </td><td style="background: #eee; font-size: smaller;"> -rw-r--r-- 1 root root 299 Oct 11 22:33 welcome.conf</td></tr> <tr><td colspan="2" align="left"><strong>Line 78:</strong></td> <td colspan="2" align="left"><strong>Line 82:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/LocationMatch&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/LocationMatch&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">This triggered the 403 redirect of any requests to the root folder of the Virtual Host and also restricted &quot;Directory Indexing&quot; via the Options attribute. This was not at all intuitive as the error codes present in the http error logs simply indicated that Directory Indexing was restricted by an Options attribute but it did NOT indicate where that instruction was being issued.</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">After too much time coincidentally I read the right side of the 403 error page below:</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">&lt;pre&gt;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">If you are the website administrator:</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">You may now add content to the directory /var/www/html/. Note that until you do so, people visiting your website will see this page, and not your content. To prevent this page from ever being used, follow the instructions in the file /etc/httpd/conf.d/welcome.conf.</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">This is the Options attribute which was overriding the .htaccess file as it was being applied after the redirect request which was trigged by no index file existing in the Virtual-Host root folder which matched the criteria specified in httpd.conf</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> DirectoryIndex index.htm index.php</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">After commenting out the welcome.conf &lt;LocationMatch&gt; all sites demonstrated expected behavior of .htaccess and their respective Options attributes.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">=== Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration ===</td><td> </td><td style="background: #eee; font-size: smaller;">=== Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration ===</td></tr> </table> Ljackson http://wiki.ljackson.us/index.php?title=Apache&diff=3526&oldid=prev Ljackson: /* Access forbidden! You don't have access to the requested directory... */ 2020-10-12T02:43:02Z <p><span class="autocomment">Access forbidden! You don't have access to the requested directory...</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 02:43, 12 October 2020</td> </tr> <tr><td colspan="2" align="left"><strong>Line 61:</strong></td> <td colspan="2" align="left"><strong>Line 61:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> touch index.htm</td><td> </td><td style="background: #eee; font-size: smaller;"> touch index.htm</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">=== Directory index forbidden by Options directive: /www/&lt;Virtual-Host-Path-HERE&gt;/htdocs/</td><td>+</td><td style="background: #cfc; font-size: smaller;">=== Directory index forbidden by Options directive: /www/&lt;Virtual-Host-Path-HERE&gt;/htdocs/ <span style="color: red; font-weight: bold;">===</span></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Previously the Apache server was configured to list files present in the root folder of any Virtual Host if a .htaccess file with the correction Options permissions was present. Presumably after an upgrade via yum at some point the addition of the following was added to the conf.d folder</td><td> </td><td style="background: #eee; font-size: smaller;">Previously the Apache server was configured to list files present in the root folder of any Virtual Host if a .htaccess file with the correction Options permissions was present. Presumably after an upgrade via yum at some point the addition of the following was added to the conf.d folder</td></tr> <tr><td colspan="2" align="left"><strong>Line 78:</strong></td> <td colspan="2" align="left"><strong>Line 78:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/LocationMatch&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/LocationMatch&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"></td><td colspan="2">&nbsp;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"></td><td colspan="2">&nbsp;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">=== Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration ===</td><td> </td><td style="background: #eee; font-size: smaller;">=== Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration ===</td></tr> </table> Ljackson http://wiki.ljackson.us/index.php?title=Apache&diff=3525&oldid=prev Ljackson: /* FAQs */ 2020-10-12T02:42:35Z <p><span class="autocomment">FAQs</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 02:42, 12 October 2020</td> </tr> <tr><td colspan="2" align="left"><strong>Line 60:</strong></td> <td colspan="2" align="left"><strong>Line 60:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">* Create an empty file in the affected directory.</td><td> </td><td style="background: #eee; font-size: smaller;">* Create an empty file in the affected directory.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> touch index.htm</td><td> </td><td style="background: #eee; font-size: smaller;"> touch index.htm</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">=== Directory index forbidden by Options directive: /www/&lt;Virtual-Host-Path-HERE&gt;/htdocs/</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Previously the Apache server was configured to list files present in the root folder of any Virtual Host if a .htaccess file with the correction Options permissions was present. Presumably after an upgrade via yum at some point the addition of the following was added to the conf.d folder</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> -rw-r--r-- 1 root root 299 Oct 11 22:33 welcome.conf</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">&lt;pre&gt;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"># This configuration file enables the default &quot;Welcome&quot;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"># page if there is no default index page present for</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"># the root URL. To disable the Welcome page, comment</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"># out all the lines below.</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">#</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">&lt;LocationMatch &quot;^/+$&quot;&gt;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> Options -Indexes</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> ErrorDocument 403 /error/noindex.html</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">&lt;/LocationMatch&gt;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">=== Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration ===</td><td> </td><td style="background: #eee; font-size: smaller;">=== Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration ===</td></tr> </table> Ljackson http://wiki.ljackson.us/index.php?title=Apache&diff=2694&oldid=prev Ljackson: /* FAQs */ 2007-11-11T17:34:15Z <p><span class="autocomment">FAQs</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 17:34, 11 November 2007</td> </tr> <tr><td colspan="2" align="left"><strong>Line 74:</strong></td> <td colspan="2" align="left"><strong>Line 74:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> LoadModule authz_user_module modules/mod_authz_user.so</td><td> </td><td style="background: #eee; font-size: smaller;"> LoadModule authz_user_module modules/mod_authz_user.so</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">=== Enforce password authentication unless accessing from local network ===</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Add the following lines to your .htaccess file:</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">&lt;pre&gt;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">AuthUserFile /www/server.com/stuff/htdocs/.htpasswd</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">AuthGroupFile /dev/null</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">AuthName &quot;Secrets :)&quot;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">AuthType Basic</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">require valid-user</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Allow from 192.168.85.0/24</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Satisfy Any</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Options FollowSymLinks ExecCGI Indexes</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Linux]]</td><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Linux]]</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Mac OS X]]</td><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Mac OS X]]</td></tr> </table> Ljackson http://wiki.ljackson.us/index.php?title=Apache&diff=2661&oldid=prev Ljackson: /* configuration error: couldn't check access. No groups file?: / */ 2007-10-18T03:48:37Z <p><span class="autocomment">configuration error: couldn't check access. No groups file?: /</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 03:48, 18 October 2007</td> </tr> <tr><td colspan="2" align="left"><strong>Line 66:</strong></td> <td colspan="2" align="left"><strong>Line 66:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> LoadModule authz_host_module modules/mod_authz_host.so</td><td> </td><td style="background: #eee; font-size: smaller;"> LoadModule authz_host_module modules/mod_authz_host.so</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">=== Invalid command 'AuthGroupFile', perhaps misspelled or defined by a module not included in the server configuration ===</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> LoadModule authz_groupfile_module modules/mod_authz_groupfile.so</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">=== configuration error: couldn't check access. No groups file?: / ===</td><td> </td><td style="background: #eee; font-size: smaller;">=== configuration error: couldn't check access. No groups file?: / ===</td></tr> </table> Ljackson http://wiki.ljackson.us/index.php?title=Apache&diff=2660&oldid=prev Ljackson: /* Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration */ 2007-10-18T03:47:14Z <p><span class="autocomment">Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 03:47, 18 October 2007</td> </tr> <tr><td colspan="2" align="left"><strong>Line 66:</strong></td> <td colspan="2" align="left"><strong>Line 66:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> LoadModule authz_host_module modules/mod_authz_host.so</td><td> </td><td style="background: #eee; font-size: smaller;"> LoadModule authz_host_module modules/mod_authz_host.so</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">=== configuration error: couldn't check access. No groups file?: / ===</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> LoadModule authz_user_module modules/mod_authz_user.so</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Linux]]</td><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Linux]]</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Mac OS X]]</td><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Mac OS X]]</td></tr> </table> Ljackson http://wiki.ljackson.us/index.php?title=Apache&diff=2658&oldid=prev Ljackson: /* Access forbidden! You don't have access to the requested directory... */ 2007-10-18T02:01:47Z <p><span class="autocomment">Access forbidden! You don't have access to the requested directory...</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 02:01, 18 October 2007</td> </tr> <tr><td colspan="2" align="left"><strong>Line 60:</strong></td> <td colspan="2" align="left"><strong>Line 60:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">* Create an empty file in the affected directory.</td><td> </td><td style="background: #eee; font-size: smaller;">* Create an empty file in the affected directory.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> touch index.htm</td><td> </td><td style="background: #eee; font-size: smaller;"> touch index.htm</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">=== Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration ===</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">mod_access has changed to authz_host_module. Please load the following module to httpd.conf:</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> LoadModule authz_host_module modules/mod_authz_host.so</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Linux]]</td><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Linux]]</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Mac OS X]]</td><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Mac OS X]]</td></tr> </table> Ljackson http://wiki.ljackson.us/index.php?title=Apache&diff=2519&oldid=prev Ljackson: /* How to redirect HTTP to HTTPS using mod_rewrite. */ 2007-08-15T03:17:07Z <p><span class="autocomment">How to redirect HTTP to HTTPS using mod_rewrite.</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 03:17, 15 August 2007</td> </tr> <tr><td colspan="2" align="left"><strong>Line 17:</strong></td> <td colspan="2" align="left"><strong>Line 17:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [L,R]</td><td> </td><td style="background: #eee; font-size: smaller;"> RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [L,R]</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Remember, if you put this rule in the main server configuration file (usually httpd.conf) rather than an .htaccess file, you'll need to use '''^/''' instead of '''^''' at the beginning of the RewriteRule line. Because of this there are two code snippets above, one for httpd.conf and one for .htaccces.</td><td>+</td><td style="background: #cfc; font-size: smaller;">Remember, if you put this rule in the main server configuration file (usually httpd.conf) rather than an .htaccess file, you'll need to use '''<span style="color: red; font-weight: bold;">&quot;</span>^/<span style="color: red; font-weight: bold;">&quot;</span>''' instead of '''<span style="color: red; font-weight: bold;">&quot;</span>^<span style="color: red; font-weight: bold;">&quot;</span>''' at the beginning of the RewriteRule line. Because of this there are two code snippets above, one for httpd.conf and one for .htaccces.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">=== How do I change the length of the URLs generated by mod_autoindex? ===</td><td> </td><td style="background: #eee; font-size: smaller;">=== How do I change the length of the URLs generated by mod_autoindex? ===</td></tr> </table> Ljackson http://wiki.ljackson.us/index.php?title=Apache&diff=2518&oldid=prev Ljackson: /* How to redirect HTTP to HTTPS using mod_rewrite. */ 2007-08-15T03:16:32Z <p><span class="autocomment">How to redirect HTTP to HTTPS using mod_rewrite.</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 03:16, 15 August 2007</td> </tr> <tr><td colspan="2" align="left"><strong>Line 5:</strong></td> <td colspan="2" align="left"><strong>Line 5:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">The following configuration will configure Apache to automatically redirect HTTP requests to HTTPS, i.e. http://www.website.com to https://www.website.com.</td><td> </td><td style="background: #eee; font-size: smaller;">The following configuration will configure Apache to automatically redirect HTTP requests to HTTPS, i.e. http://www.website.com to https://www.website.com.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">httpd.conf:</td><td>+</td><td style="background: #cfc; font-size: smaller;"><span style="color: red; font-weight: bold;">'''</span>httpd.conf<span style="color: red; font-weight: bold;">'''</span>:</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> RewriteEngine On</td><td> </td><td style="background: #eee; font-size: smaller;"> RewriteEngine On</td></tr> <tr><td colspan="2" align="left"><strong>Line 11:</strong></td> <td colspan="2" align="left"><strong>Line 11:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]</td><td> </td><td style="background: #eee; font-size: smaller;"> RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">.htaccess:</td><td>+</td><td style="background: #cfc; font-size: smaller;"><span style="color: red; font-weight: bold;">'''</span>.htaccess<span style="color: red; font-weight: bold;">'''</span>:</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> RewriteEngine On</td><td> </td><td style="background: #eee; font-size: smaller;"> RewriteEngine On</td></tr> </table> Ljackson http://wiki.ljackson.us/index.php?title=Apache&diff=2517&oldid=prev Ljackson: /* FAQs */ 2007-08-15T03:15:39Z <p><span class="autocomment">FAQs</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 03:15, 15 August 2007</td> </tr> <tr><td colspan="2" align="left"><strong>Line 1:</strong></td> <td colspan="2" align="left"><strong>Line 1:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">== FAQs ==</td><td> </td><td style="background: #eee; font-size: smaller;">== FAQs ==</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">=== How to redirect HTTP to HTTPS using mod_rewrite. ===</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">The following configuration will configure Apache to automatically redirect HTTP requests to HTTPS, i.e. http://www.website.com to https://www.website.com.</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">httpd.conf:</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> RewriteEngine On</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> RewriteCond %{SERVER_PORT} !^443$</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">.htaccess:</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> RewriteEngine On</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> RewriteCond %{SERVER_PORT} !^443$</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [L,R]</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Remember, if you put this rule in the main server configuration file (usually httpd.conf) rather than an .htaccess file, you'll need to use '''^/''' instead of '''^''' at the beginning of the RewriteRule line. Because of this there are two code snippets above, one for httpd.conf and one for .htaccces.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">=== How do I change the length of the URLs generated by mod_autoindex? ===</td><td> </td><td style="background: #eee; font-size: smaller;">=== How do I change the length of the URLs generated by mod_autoindex? ===</td></tr> </table> Ljackson