<?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>WEBPIRATEN &#187; htaccess</title>
	<atom:link href="http://webpiraten.de/index.php/tag/htaccess/feed/" rel="self" type="application/rss+xml" />
	<link>http://webpiraten.de</link>
	<description>Techblog / Photographie</description>
	<lastBuildDate>Fri, 18 May 2012 10:03:31 +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>Nachfolgende Slashes mit mod_rewrite entfernen?</title>
		<link>http://webpiraten.de/index.php/server/nachfolgende-slashes-mit-mod-rewrite-entfernen/</link>
		<comments>http://webpiraten.de/index.php/server/nachfolgende-slashes-mit-mod-rewrite-entfernen/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 22:04:47 +0000</pubDate>
		<dc:creator>endorfin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod rewrite]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rule]]></category>
		<category><![CDATA[slash]]></category>
		<category><![CDATA[trailing]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=181</guid>
		<description><![CDATA[Mit diesem kleine Eintrag werden URLs mit einem Slash am Ende auf die gleiche URL ohne Slash am Ende geleitet. In meiner Rails Anwendung verursachten URLs mit einem Slash am Ende einen 403 &#8211; Forbidden.]]></description>
			<content:encoded><![CDATA[<p>Mit diesem kleine Eintrag werden URLs mit einem Slash am Ende auf die gleiche URL ohne Slash am Ende geleitet. In meiner Rails Anwendung verursachten URLs mit einem Slash am Ende einen 403 &#8211; Forbidden.</p>
<pre class="brush: bash; title: ; notranslate">

RewriteEngine On
RewriteRule ^(.+)/$  $1 [R=301,L]
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/server/nachfolgende-slashes-mit-mod-rewrite-entfernen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTTP Authentifizierung mit Lighttpd</title>
		<link>http://webpiraten.de/index.php/server/http-authentifizierung-mit-lighttpd/</link>
		<comments>http://webpiraten.de/index.php/server/http-authentifizierung-mit-lighttpd/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 21:19:06 +0000</pubDate>
		<dc:creator>webpirat</dc:creator>
				<category><![CDATA[Lighttpd]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[authentifizierung]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[lighty]]></category>
		<category><![CDATA[passwort]]></category>
		<category><![CDATA[passwortschutz]]></category>
		<category><![CDATA[verzeichnis]]></category>
		<category><![CDATA[vhost]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=122</guid>
		<description><![CDATA[Um im schlanken Webserver Lighty eine HTTP Authentifizierung für bestimmte Verzeichnisse zu erzeugen, ist es notwendig, in der /etc/lighttpd/lighttpd.conf das Server-Modul mod_access und mod_auth zu aktivieren. Um ein Verzeichnis unterhalb eines bestehenden Webroots nun mit einer Authentifizierung zu schützen, tragen &#8230; <a href="http://webpiraten.de/index.php/server/http-authentifizierung-mit-lighttpd/">weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Um im schlanken Webserver Lighty eine HTTP Authentifizierung für bestimmte Verzeichnisse zu erzeugen, ist es notwendig, in der <strong>/etc/lighttpd/lighttpd.conf</strong> das Server-Modul <strong>mod_access</strong> und <strong>mod_auth</strong> zu aktivieren.</p>
<pre class="brush: bash; title: ; notranslate">

server.modules = (
                    &quot;mod_access&quot;,
                    &quot;mod_auth&quot;,
                    &quot;mod_alias&quot;,
                    &quot;mod_accesslog&quot;,
                    &quot;mod_compress&quot;,
                    &quot;mod_cgi&quot;,
                    &quot;mod_fastcgi&quot;,
                    &quot;mod_rewrite&quot;,
                    &quot;mod_magnet&quot;,
                    &quot;mod_redirect&quot;,
                    &quot;mod_status&quot;,
                    )
</pre>
<p>Um ein Verzeichnis unterhalb eines bestehenden Webroots nun mit einer Authentifizierung zu schützen, tragen wir das in der <strong>/etc/lighttpd/vhosts.conf</strong> ein.</p>
<pre class="brush: bash; title: ; notranslate">

$HTTP[&quot;host&quot;] =~ &quot;(^|\.)domain\.tld$&quot; {
        server.document-root = &quot;/home/user/pages/&quot;
        auth.backend = &quot;htpasswd&quot;
        auth.backend.htpasswd.userfile = &quot;/home/user/passwd.txt&quot;
        auth.require = (&quot;/&quot; =&gt; (
                                 &quot;method&quot; =&gt; &quot;basic&quot;,
                                 &quot;realm&quot; =&gt; &quot;admin&quot;,
                                 &quot;require&quot; =&gt; &quot;valid-user&quot;
                                 )
                         )
}
</pre>
<p>Zu guter Letzt benötigen wir noch die <strong>/home/user/passwd.txt</strong> die die betreffenden Authentifizierungsinfos bereit hält.</p>
<pre class="brush: bash; title: ; notranslate">

user:basic_encoded_password
</pre>
<p>Fortan ist der Ordner <strong>/home/user/pages/</strong> passwortgeschützt.<br />
Möchte man einen Unterordner passwortschützen, trägt man diesen statt des Slashes ein:</p>
<pre class="brush: bash; title: ; notranslate">

auth.require = (&quot;/subdir/&quot; =&gt; (
                                  &quot;method&quot;  =&gt; &quot;basic&quot;,
                                  &quot;realm&quot;   =&gt; &quot;admin&quot;,
                                  &quot;require&quot; =&gt; &quot;valid-user&quot;
                                  )
            )
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/server/http-authentifizierung-mit-lighttpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

