<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Crafting software&#187; apache2</title>
	<atom:link href="http://davidlaing.com/tag/apache2/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidlaing.com</link>
	<description>David Laing&#039;s thoughts on software development</description>
	<lastBuildDate>Wed, 01 Feb 2012 11:02:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Apache2 on Ubuntu 8.04LTS; restrict access to PAM authenticated users</title>
		<link>http://davidlaing.com/2008/12/27/apache2-on-ubuntu-804lts-restrict-access-to-pam-authenticated-users/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=apache2-on-ubuntu-804lts-restrict-access-to-pam-authenticated-users</link>
		<comments>http://davidlaing.com/2008/12/27/apache2-on-ubuntu-804lts-restrict-access-to-pam-authenticated-users/#comments</comments>
		<pubDate>Sat, 27 Dec 2008 19:40:26 +0000</pubDate>
		<dc:creator>mrdavidlaing</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[pam]]></category>

		<guid isPermaLink="false">http://davidlaing.com/?p=140</guid>
		<description><![CDATA[I have a couple of static pages that I want to restrict access to. I don&#8217;t want to manage another set of usernames &#38; passwds, so I&#8217;d like apache2 to authenticate off the standard users on my system, via PAM. To get this to work, you need to install and configure mod_auth_pam and mod_auth_shadow aptitude [...]]]></description>
			<content:encoded><![CDATA[<p>I have a couple of static pages that I want to restrict access to.</p>
<p>I don&#8217;t want to manage another set of usernames &amp; passwds, so I&#8217;d like apache2 to authenticate off the standard users on my system, via PAM.</p>
<p>To get this to work, you need to install and configure mod_auth_pam and mod_auth_shadow</p>
<pre>aptitude install libapache2-mod-auth-pam libapache2-mod-auth-shadow</pre>
<p>Ensure the <a href="http://ubuntuforums.org/showthread.php?t=275996">www-data user is part of the shadow group</a>, so apache2 can read the passwords</p>
<pre>usermod -G shadow www-data</pre>
<p>And set up the relevent virtual host:</p>
<pre>

                AuthPAM_Enabled On
                AuthShadow on
                AuthPAM_FallThrough Off
                AuthBasicAuthoritative Off
                AuthType Basic
                AuthName "Restricted to group: sysadmins"
                AuthUserFile /dev/null
                Require group sysadmins</pre>
<p>Restart apache, and you&#8217;re done!</p>
]]></content:encoded>
			<wfw:commentRss>http://davidlaing.com/2008/12/27/apache2-on-ubuntu-804lts-restrict-access-to-pam-authenticated-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

