https://help.ece.ubc.ca/mediawiki/index.php?title=How_To_Password_Protect_Personal_Web_Content&feed=atom&action=history
How To Password Protect Personal Web Content - Revision history
2024-03-29T05:19:20Z
Revision history for this page on the wiki
MediaWiki 1.34.2
https://help.ece.ubc.ca/mediawiki/index.php?title=How_To_Password_Protect_Personal_Web_Content&diff=917&oldid=prev
Derekp: More Apache 2.4 updates
2017-09-28T23:09:22Z
<p>More Apache 2.4 updates</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 23:09, 28 September 2017</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l12" >Line 12:</td>
<td colspan="2" class="diff-lineno">Line 12:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>protect the username/password between the web surfer's browser and the</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>protect the username/password between the web surfer's browser and the</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>departmental web server, as instructed below.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>departmental web server, as instructed below.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">==Syntax Changes in Apache 2.2==</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">In version 2.2 of the Apache webserver, the syntax for configuring password</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">protection [http://httpd.apache.org/docs/2.2/upgrading.html changed].</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">Although the new syntax is more logical and flexible, it is not</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">backwards-compatible.</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">Currently, ECE course websites, research group websites, and personal websites are</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">running on Apache 2.2. (Personal websites were upgraded March 27, 2008. If you</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">encounter Internal Server Errors when accessing password-protected content in your</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">personal website, you will need to</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">[[How To Password-Protect Web Content (Instructions for Apache 2.0 or Earlier)|update your configuration]].)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Directory Layout==</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Directory Layout==</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l167" >Line 167:</td>
<td colspan="2" class="diff-lineno">Line 153:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>For more information on the <tt>Require</tt> directives, please see</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>For more information on the <tt>Require</tt> directives, please see</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>http://httpd.apache.org/docs/2.2/mod/core.html#require .</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>http://httpd.apache.org/docs/2.2/mod/core<ins class="diffchange diffchange-inline">.html#require and http://httpd.apache.org/docs/2.4/mod/mod_authz_core</ins>.html#require .</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==See Also== </div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==See Also== </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* [<del class="diffchange diffchange-inline">[How To Password-Protect Web Content (Instructions for </del>Apache 2.<del class="diffchange diffchange-inline">0 or Earlier)]</del>]</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* [<ins class="diffchange diffchange-inline">http://httpd.apache.org/docs/2.2/howto/auth.html </ins>Apache 2.<ins class="diffchange diffchange-inline">2 Documentation</ins>]</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* [http://httpd.apache.org/docs/2.<del class="diffchange diffchange-inline">2</del>/howto/auth.html Apache Documentation]</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* [http://httpd.apache.org/docs/2.<ins class="diffchange diffchange-inline">4</ins>/howto/auth.html Apache <ins class="diffchange diffchange-inline">2.4 </ins>Documentation]</div></td></tr>
</table>
Derekp
https://help.ece.ubc.ca/mediawiki/index.php?title=How_To_Password_Protect_Personal_Web_Content&diff=916&oldid=prev
Derekp: Updated instructions for Apache 2.4 compatibility
2017-09-25T22:57:16Z
<p>Updated instructions for Apache 2.4 compatibility</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 22:57, 25 September 2017</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l163" >Line 163:</td>
<td colspan="2" class="diff-lineno">Line 163:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> |-</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> |-</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> | specific groups (e.g., <tt>robotics</tt>)</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> | specific groups (e.g., <tt>robotics</tt>)</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> | <tt>Require group robotics</tt></div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> | <tt><ins class="diffchange diffchange-inline"><IfVersion < 2.4><br>&nbsp;&nbsp;&nbsp;&nbsp;</ins>Require group robotics<ins class="diffchange diffchange-inline"><br></IfVersion><br><IfVersion >= 2.4><br>&nbsp;&nbsp;&nbsp;&nbsp;Require unix-group robotics<br></IfVersion></ins></tt></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> </del>|}</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>For more information on the <tt>Require</tt> directives, please see</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>For more information on the <tt>Require</tt> directives, please see</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>http://httpd.apache.org/docs/2.2/mod/core.html#require .</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>http://httpd.apache.org/docs/2.2/mod/core.html#require .</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==See Also== </div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==See Also== </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[How To Password-Protect Web Content (Instructions for Apache 2.0 or Earlier)]]</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[How To Password-Protect Web Content (Instructions for Apache 2.0 or Earlier)]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [http://httpd.apache.org/docs/2.2/howto/auth.html Apache Documentation]</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [http://httpd.apache.org/docs/2.2/howto/auth.html Apache Documentation]</div></td></tr>
</table>
Derekp
https://help.ece.ubc.ca/mediawiki/index.php?title=How_To_Password_Protect_Personal_Web_Content&diff=132&oldid=prev
Derekp: Minor clarifications and typesetting changes.
2011-09-07T17:52:59Z
<p>Minor clarifications and typesetting changes.</p>
<a href="https://help.ece.ubc.ca/mediawiki/index.php?title=How_To_Password_Protect_Personal_Web_Content&diff=132&oldid=108">Show changes</a>
Derekp
https://help.ece.ubc.ca/mediawiki/index.php?title=How_To_Password_Protect_Personal_Web_Content&diff=108&oldid=prev
Derekp: Removed superfluous backslashes
2009-08-28T05:35:33Z
<p>Removed superfluous backslashes</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 05:35, 28 August 2009</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l76" >Line 76:</td>
<td colspan="2" class="diff-lineno">Line 76:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> | ''~/etc/www/priv/.htpasswd''</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> | ''~/etc/www/priv/.htpasswd''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> | ''rw-r--r--'' (''chmod a+r'')</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> | ''rw-r--r--'' (''chmod a+r'')</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> | Apache file for <del class="diffchange diffchange-inline">\</del>AuthUserFile</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> | Apache file for AuthUserFile</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> |-</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> |-</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> | ''~/etc/www/priv/.htgroup''</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> | ''~/etc/www/priv/.htgroup''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> | ''rw-r--r--'' (''chmod a+r'')</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> | ''rw-r--r--'' (''chmod a+r'')</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> | Apache file for <del class="diffchange diffchange-inline">\</del>AuthGroupFile</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> | Apache file for AuthGroupFile</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> |}</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> |}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
</table>
Derekp
https://help.ece.ubc.ca/mediawiki/index.php?title=How_To_Password_Protect_Personal_Web_Content&diff=52&oldid=prev
Jazminl: New Page
2009-05-15T23:04:27Z
<p>New Page</p>
<p><b>New page</b></p><div><!--Originally written by: Derek Poon--><br />
<!--Originally written on: 2008-Mar-28--><br />
<br />
You already know [[How To Publish Personal Web Content]], but you want to<br />
restrict web surfers' access to certain pages. This can be accomplished by<br />
requiring users to authenticate with the web server to access these<br />
password-protected pages.<br />
<br />
The HTTP protocol has the ability to prompt a user for a username and password.<br />
You can require users to enter the username/password of their departmental<br />
account or check the username/password against your own password file.<br />
<br />
Unfortunately, the HTTP authentication mechanism transmits this information<br />
unencrypted. Therefore you '''must''' enforce the use of HTTPS (HTTP+SSL) to<br />
protect the username/password between the web surfer's browser and the<br />
departmental web server, as instructed below.<br />
<br />
<br />
==Syntax Changes in Apache 2.2==<br />
In version 2.2 of the Apache webserver, the syntax for configuring password<br />
protection [http://httpd.apache.org/docs/2.2/upgrading.html changed].<br />
Although the new syntax is more logical and flexible, it is not<br />
backwards-compatible.<br />
<br />
Currently, ECE course websites, research group websites, and personal websites are<br />
running on Apache 2.2. (Personal websites were upgraded March 27, 2008. If you<br />
encounter Internal Server Errors when accessing password-protected content in your<br />
personal website, you will need to<br />
[[How To Password-Protect Web Content (Instructions for Apache 2.0 or Earlier)|update your configuration]].)<br />
<br />
<br />
==Directory Layout==<br />
First you need to set up an area in your document tree that you wish to make<br />
private. These instructions follow the convention that the ''~/etc/www/priv/''<br />
directory is the one containing the password-protected content, but it could be<br />
any directory within the ''~/etc/www/'' document tree.<br />
<br />
{| class="wikitable"<br />
|-<br />
! File or Directory<br />
! Minimum Filesystem Permissions<br />
! Comment<br />
|-<br />
| ''~/''<br />
| ''rwx--x--x'' (''chmod a+x'')<br />
| Your home directory<br />
|-<br />
| ''~/etc/''<br />
| ''rwx--x--x'' (''chmod a+x'')<br />
| Your etc directory<br />
|-<br />
| ''~/etc/www/''<br />
| ''rwx--x--x'' (''chmod a+x'')<br />
| Your document root<br />
|-<br />
| ''~/etc/www/index.html''<br />
| ''rw-r--r--'' (''chmod a+r'')<br />
| Your public home page<br />
|-<br />
| ''~/etc/www/public.html''<br />
| ''rw-r--r--'' (''chmod a+r'')<br />
| Another public document<br />
|-<br />
| ''~/etc/www/priv/''<br />
| ''rwx--x--x'' (''chmod a+x'')<br />
| Directory for password-protected files<br />
|-<br />
| ''~/etc/www/priv/protected.html''<br />
| ''rw-r--r--'' (''chmod a+r'')<br />
| A password-protected document<br />
|-<br />
| ''~/etc/www/priv/.htaccess''<br />
| ''rw-r--r--'' (''chmod a+r'')<br />
| Apache config file<br />
|-<br />
| ''~/etc/www/priv/.htpasswd''<br />
| ''rw-r--r--'' (''chmod a+r'')<br />
| Apache file for \AuthUserFile<br />
|-<br />
| ''~/etc/www/priv/.htgroup''<br />
| ''rw-r--r--'' (''chmod a+r'')<br />
| Apache file for \AuthGroupFile<br />
|}<br />
<br />
All of these files need to have world-readable filesystem<br />
permissions (''chmod a+r'') and all of these directories need to be marked<br />
world-executable (''chmod a+x'') to allow the webserver to access them.<br />
<br />
The key to getting this setup to work is the ''.htaccess'' file in the ''priv''<br />
directory. There are three basic variations for this file:<br />
<br />
==Variation 1: Authenticate Departmental Users Only==<br />
Use the following ''.htaccess'' file:<br />
<br />
<pre><br />
# Force the use of SSL...<br />
SSLRequireSSL<br />
# ... and redirect non-SSL requests to the corresponding HTTPS URL<br />
ErrorDocument 403 /cgi-bin/ssl-redirect<br />
<br />
# Use HTTP Basic Authentication<br />
AuthType Basic<br />
# Validate usernames/passwords against the ECE account database<br />
AuthBasicProvider ece<br />
# The AuthName is incorporated in the username/password prompt<br />
AuthName "ECE Account"<br />
# Allow any authenticated user<br />
Require valid-user<br />
</pre><br />
<br />
You can restrict access to specific ECE users and groups by changing the<br />
''Require valid-user'' line. For more information, see<br />
[[#The All-Important Require Directive|The All-Important ''Require'' Directive]] below.<br />
<br />
==Variation 2: Authenticate Non-Departmental Users Only==<br />
With this ''.htaccess'' configuration, only users listed in your ''.htpasswd''<br />
file may access the private pages. To create and manage your ''.htpasswd''<br />
file, use the ''htpasswd'' utility.<br />
<br />
<pre><br />
SSLRequireSSL<br />
ErrorDocument 403 /cgi-bin/ssl-redirect<br />
<br />
AuthType Basic<br />
AuthBasicProvider file<br />
AuthUserFile <path to home directory>/etc/www/priv/.htpasswd<br />
AuthName "my private page"<br />
Require valid-user<br />
</pre><br />
<br />
The ''AuthBasicProvider file'' line may be omitted.<br />
<br />
Please ensure that value for ''<path to home directory>'' that you use is<br />
identical to that reported by the command ''getent passwd '''''username'''.<br />
It must be a full path (starting with ''/ubc/ece/home/...'' or<br />
''/usr/home/...''); ''~username'' will not work.<br />
<br />
<br />
==Variation 3: Authenticate Non-Departmental and Departmental Users==<br />
With this ''.htaccess'' configuration, the webserver will authenticate<br />
the user against both your ''.htpasswd'' file and the ECE account database.<br />
<br />
<pre><br />
SSLRequireSSL<br />
ErrorDocument 403 /cgi-bin/ssl-redirect<br />
<br />
AuthType Basic<br />
AuthBasicProvider file ece<br />
AuthName "ECE or Other Account"<br />
AuthUserFile <path to home directory>/etc/www/priv/.htpasswd<br />
Require valid-user<br />
</pre><br />
<br />
<br />
==The All-Important ''Require'' Directive==<br />
<br />
The ''Require'' directive is the means by which you can restrict access to your<br />
password-protected personal web content to a specific set of users. The<br />
following table of examples should help to understand how the directive can be<br />
used.<br />
<br />
<br />
{| class="wikitable"<br />
|-<br />
! To restrict access to...<br />
! ... use this ''Require'' directive<br />
|-<br />
| any authenticated user<br />
| ''Require valid-user''<br />
|-<br />
| specific users (e.g., ''lucaf'' and ''robr'')<br />
| ''Require user lucaf robr''<br />
|-<br />
| specific groups (e.g., ''robotics'')<br />
| ''Require group robotics''<br />
|}<br />
<br />
For more information on the ''Require'' directives, please see<br />
http://httpd.apache.org/docs/2.2/mod/core.html#require .<br />
<br />
<br />
==See Also== <br />
* [[How To Password-Protect Web Content (Instructions for Apache 2.0 or Earlier)]]<br />
* [http://httpd.apache.org/docs/2.2/howto/auth.html Apache Documentation]</div>
Jazminl