<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.scott5.org/index.php?action=history&amp;feed=atom&amp;title=Apache</id>
	<title>Apache - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.scott5.org/index.php?action=history&amp;feed=atom&amp;title=Apache"/>
	<link rel="alternate" type="text/html" href="https://wiki.scott5.org/index.php?title=Apache&amp;action=history"/>
	<updated>2026-04-13T00:32:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://wiki.scott5.org/index.php?title=Apache&amp;diff=425&amp;oldid=prev</id>
		<title>Scott at 00:19, 4 February 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.scott5.org/index.php?title=Apache&amp;diff=425&amp;oldid=prev"/>
		<updated>2011-02-04T00:19:53Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{lowercase title}}&lt;br /&gt;
== server-side includes ==&lt;br /&gt;
To enable server side includes under Ubuntu Apache2:&lt;br /&gt;
# In &amp;lt;code&amp;gt;/etc/apache2/mods-available/dir.conf&amp;lt;/code&amp;gt;, add &amp;lt;code&amp;gt;index.shtml&amp;lt;/code&amp;gt; to list of directories&lt;br /&gt;
# In &amp;lt;code&amp;gt;/etc/apache2/mods-enabled&amp;lt;/code&amp;gt;, create a link to &amp;lt;code&amp;gt;../mods-available/include.load&amp;lt;/code&amp;gt;&lt;br /&gt;
# In &amp;lt;code&amp;gt;/etc/apache2/sites-available/default&amp;lt;/code&amp;gt;, add the &amp;lt;code&amp;gt;Includes&amp;lt;/code&amp;gt; directive to the &amp;lt;code&amp;gt;Options&amp;lt;/code&amp;gt; state in the &amp;lt;code&amp;gt;Directory /var/www/&amp;lt;/code&amp;gt; section.&lt;br /&gt;
&lt;br /&gt;
== password-protected directory ==&lt;br /&gt;
Create a directory entry in your site definition file (e.g. &amp;lt;code&amp;gt;/etc/apache2/sites-available/my_site&amp;lt;/code&amp;gt;):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/ucdirc/training&amp;gt;&lt;br /&gt;
    AuthType Basic&lt;br /&gt;
    AuthName &amp;quot;Protected Information&amp;quot;&lt;br /&gt;
    AuthUserFile /etc/apache2/htpassword&lt;br /&gt;
    Require valid-user&lt;br /&gt;
    Options +Indexes&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;+Indexes&amp;lt;/code&amp;gt; option shows users the contents of the entire directory when they browse to it.  This may or may not be desired.&lt;br /&gt;
&lt;br /&gt;
Next, create a user/passwd pair in the password file with the &amp;lt;code&amp;gt;htpasswd&amp;lt;/code&amp;gt; command.  Here are some examples for the &amp;lt;code&amp;gt;htpasswd&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
htpasswd /usr/local/etc/apache/.htpasswd-users jsmith&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Adds or modifies the password for user &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;. The user is prompted for the password.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
htpasswd -c /home/doe/public_html/.htpasswd jane&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Creates a new file and stores a record in it for user &amp;lt;code&amp;gt;jane&amp;lt;/code&amp;gt;. The user is prompted for the password.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
htpasswd -mb /usr/web/.htpasswd-all jones Pwd4Steve&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Encrypts the password from the command line (&amp;lt;code&amp;gt;Pwd4Steve&amp;lt;/code&amp;gt;) using the MD5 algorithm, and stores it in the specified file.&lt;br /&gt;
&lt;br /&gt;
More on the htpasswd command: http://httpd.apache.org/docs/2.2/programs/htpasswd.html&lt;/div&gt;</summary>
		<author><name>Scott</name></author>
	</entry>
</feed>