<?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>ClearChain &#187; apache</title>
	<atom:link href="http://www.clearchain.com/blog/tags/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://www.clearchain.com/blog</link>
	<description>-= Daily Happenings =-</description>
	<lastBuildDate>Wed, 05 Oct 2011 23:02:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Solving the Apache SSL error &#8220;Oops, no RSA or DSA server certificate found for &#8216;www.somedomain.com:0&#8242;?!&#8221;</title>
		<link>http://www.clearchain.com/blog/posts/solving-the-apache-ssl-error-oops-no-rsa-or-dsa-server-certificate-found-for-www-somedomain-com0</link>
		<comments>http://www.clearchain.com/blog/posts/solving-the-apache-ssl-error-oops-no-rsa-or-dsa-server-certificate-found-for-www-somedomain-com0#comments</comments>
		<pubDate>Fri, 21 Jan 2011 01:17:29 +0000</pubDate>
		<dc:creator>Benjamin Close</dc:creator>
				<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[crash]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[startup]]></category>
		<category><![CDATA[webserver]]></category>
		<category><![CDATA[www]]></category>

		<guid isPermaLink="false">http://www.clearchain.com/blog/?p=877</guid>
		<description><![CDATA[<a href="http://www.clearchain.com/blog/posts/solving-the-apache-ssl-error-oops-no-rsa-or-dsa-server-certificate-found-for-www-somedomain-com0"><img align="left" hspace="5" width="150" src="http://www.clearchain.com/blog/images//2011/01/ssl-logo.gif" class="alignleft wp-post-image tfe" alt="" title="ssl-logo" /></a>Recently a colleague of mine came to me with a problem he was having with SSL certificates and the web server Apache 2.2. Put simply Apache (httpd) would not start. It was an unusual situation as this server had been running flawlessly for almost 2 years and it was only a recent power outage that<a href="http://www.clearchain.com/blog/posts/solving-the-apache-ssl-error-oops-no-rsa-or-dsa-server-certificate-found-for-www-somedomain-com0"> <font size=-2>[..more..]</font></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.clearchain.com/blog/images//2011/01/ssl-logo.gif"><img class="alignleft size-full wp-image-883" title="ssl-logo" src="http://www.clearchain.com/blog/images//2011/01/ssl-logo.gif" alt="" width="100" height="50" /></a>Recently a colleague of mine came to me with a problem he was having with SSL certificates and the <a href="http://httpd.apache.org/">web server Apache 2.2</a>. Put simply Apache (httpd) would not start. It was an unusual situation as this server had been running flawlessly for almost 2 years and it was only a recent power outage that had caused the error to occur. Running<em> apachectl configtest</em> revealed no problems with the setup but when running <em>apachectl start</em>, whilst there was no errors reported on the command line, apache would instantly die/crash. Checking the log files we found:</p>
<pre><strong>[Thu Jan 20 14:15:16 2011] [error] Oops, no RSA or DSA server certificate found for 'www.somedomain.com:0'?!</strong></pre>
<p>Whilst <em>somedomain.com</em> isn&#8217;t the official domain name reported (I can&#8217;t reveal the client), this error was being printed for every SSL host except the default SSL host. Ironically the default SSL host was simply a redirect to one of the others. A quick check and indeed the problem lied with the SSL hosts &#8211; we removed every ssl host and the webserver would start fine &#8211; obviously without any ssl.</p>
<p>My colleague and I were  perplexed. He&#8217;d tried a quite few things to fix this all without luck. A so call Server Admin told him it was due to not using ip based virtual hosts for ssl, he claimed you can&#8217;t use Name Base Virtual hosts with SSL. No doubt this was obtained from a <a href="http://mail-archives.apache.org/mod_mbox/httpd-users/200512.mbox/%3C8C29B2F93BAE9047A906EF6D6F9C5D43FE00B5@exchange2k301.gaia.fr%3E">quick google search for the error.</a> The problems is you <em><span style="text-decoration: underline;">can</span></em> run NamedBasedVirtual hosts with SSL on port 443 provided you have a wildcard SSL certificate. A wild is required for NamedBaseVirtual hosts as the SSL connection is established first before the headers are sent. A wildcard will allow any subdomain to use the SSL connection then apache will see the host header and respond with the appropriate vhost. If on only have a single certificate this does not work and you&#8217;ll need a separate IP per certificate.</p>
<p>Anyway, we began trying to debug the issue. First we checked the certificate files were at the specified locations &#8211; they were. Next we checked the certificates were actually valid. You can use the <a href="http://www.openssl.org/">openssl</a> command below to do this:</p>
<pre><strong>openssl x509 -noout -text -in <em>YOURCERTIFICATE.crt</em></strong></pre>
<p>The certificate, key, and certificate authority (CA) were all valid and in date.<br />
Next we tried putting each Vhost in to the config one by one to see if one host had errors over another. Turns out it didn&#8217;t matter what order each host was in the config file or which ssl hosts were included, they all had issues &#8211; except for the default ssl vhost.</p>
<p>At this point we were a little lost. So we decided to go back to basics and work out what the error really meant. We search to see what apache module the error came from. A simple grep later we&#8217;d narrowed down the error to mod_ssl. A search of the mod_ssl source code found the following instance of the message:</p>
<pre># grep Oops *
ssl_engine_init.c:                         "Init: Oops, you want to request client "
ssl_engine_init.c:                "<strong>Oops, no RSA or DSA server certificate found</strong> "
ssl_engine_init.c:                "Oops, no RSA or DSA server private key found?!");
ssl_engine_io.c:                    (argp != NULL ? "(BIO dump follows)" : "(Oops, no memory buffer?)"));</pre>
<p>Looking in <em>ssl_engine_init.c </em>we found the error came from the following function</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">static</span> <span style="color: #993333;">void</span> ssl_init_server_certs<span style="color: #009900;">&#40;</span>server_rec <span style="color: #339933;">*</span>s<span style="color: #339933;">,</span>
                                  apr_pool_t <span style="color: #339933;">*</span>p<span style="color: #339933;">,</span>
                                  apr_pool_t <span style="color: #339933;">*</span>ptemp<span style="color: #339933;">,</span>
                                  modssl_ctx_t <span style="color: #339933;">*</span>mctx<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #993333;">const</span> <span style="color: #993333;">char</span> <span style="color: #339933;">*</span>rsa_id<span style="color: #339933;">,</span> <span style="color: #339933;">*</span>dsa_id<span style="color: #339933;">;</span>
    <span style="color: #993333;">const</span> <span style="color: #993333;">char</span> <span style="color: #339933;">*</span>vhost_id <span style="color: #339933;">=</span> mctx<span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>sc<span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>vhost_id<span style="color: #339933;">;</span>
    <span style="color: #993333;">int</span> i<span style="color: #339933;">;</span>
    <span style="color: #993333;">int</span> have_rsa<span style="color: #339933;">,</span> have_dsa<span style="color: #339933;">;</span>
&nbsp;
    rsa_id <span style="color: #339933;">=</span> ssl_asn1_table_keyfmt<span style="color: #009900;">&#40;</span>ptemp<span style="color: #339933;">,</span> vhost_id<span style="color: #339933;">,</span> SSL_AIDX_RSA<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    dsa_id <span style="color: #339933;">=</span> ssl_asn1_table_keyfmt<span style="color: #009900;">&#40;</span>ptemp<span style="color: #339933;">,</span> vhost_id<span style="color: #339933;">,</span> SSL_AIDX_DSA<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #339933;">&lt;</span>em<span style="color: #339933;">&gt;</span>have_rsa<span style="color: #339933;">&lt;/</span>em<span style="color: #339933;">&gt;</span> <span style="color: #339933;">=</span> ssl_server_import_cert<span style="color: #009900;">&#40;</span>s<span style="color: #339933;">,</span> mctx<span style="color: #339933;">,</span> rsa_id<span style="color: #339933;">,</span> SSL_AIDX_RSA<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #339933;">&lt;</span>em<span style="color: #339933;">&gt;</span>have_dsa<span style="color: #339933;">&lt;/</span>em<span style="color: #339933;">&gt;</span> <span style="color: #339933;">=</span> ssl_server_import_cert<span style="color: #009900;">&#40;</span>s<span style="color: #339933;">,</span> mctx<span style="color: #339933;">,</span> dsa_id<span style="color: #339933;">,</span> SSL_AIDX_DSA<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span>have_rsa <span style="color: #339933;">||</span> have_dsa<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        ap_log_error<span style="color: #009900;">&#40;</span>APLOG_MARK<span style="color: #339933;">,</span> APLOG_ERR<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> s<span style="color: #339933;">,</span>
                <span style="color: #339933;">&lt;</span>strong<span style="color: #339933;">&gt;</span><span style="color: #ff0000;">&quot;Oops, no RSA or DSA server certificate found &quot;</span>
                <span style="color: #ff0000;">&quot;for&lt;/strong&gt; '%s:%d'?!&quot;</span><span style="color: #339933;">,</span> s<span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>server_hostname<span style="color: #339933;">,</span> s<span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>port<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        ssl_die<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> SSL_AIDX_MAX<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>         ssl_check_public_cert<span style="color: #009900;">&#40;</span>s<span style="color: #339933;">,</span> ptemp<span style="color: #339933;">,</span> mctx<span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>pks<span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>certs<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    have_rsa <span style="color: #339933;">=</span> ssl_server_import_key<span style="color: #009900;">&#40;</span>s<span style="color: #339933;">,</span> mctx<span style="color: #339933;">,</span> rsa_id<span style="color: #339933;">,</span> SSL_AIDX_RSA<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    have_dsa <span style="color: #339933;">=</span> ssl_server_import_key<span style="color: #009900;">&#40;</span>s<span style="color: #339933;">,</span> mctx<span style="color: #339933;">,</span> dsa_id<span style="color: #339933;">,</span> SSL_AIDX_DSA<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span>have_rsa <span style="color: #339933;">||</span> have_dsa<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        ap_log_error<span style="color: #009900;">&#40;</span>APLOG_MARK<span style="color: #339933;">,</span> APLOG_ERR<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> s<span style="color: #339933;">,</span>
                <span style="color: #ff0000;">&quot;Oops, no RSA or DSA server private key found?!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        ssl_die<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Hence  the error was caused by the certificates not being able to be imported. Once again we checked paths to make sure the certificates/keys were correct. Alas they were. So we began to wonder why the certificates couldn&#8217;t be found. We&#8217;d specified the correct files, confirmed they were correct. It occurred to me that perhaps the openSSL context had not been setup correctly. But why not? I took a look at the default SSL vhost which did work and noticed a single line that were not in any of the other ssl vhosts.</p>
<pre>SSLEngine on</pre>
<p>The comment above this line read:</p>
<pre>#   SSL Engine Switch:
#   Enable/Disable SSL for this virtual host.</pre>
<p>I added &#8220;<em>SSLEngine On&#8221;</em> to the other ssl vhosts and it worked! So it turns out you can have an vhost setup on port 443 without SSL hence for each vhost you want SSL working in you must add the above line. My colleague was extremely thankful &#8211; why it happened in the  first place, we still don&#8217;t know. We suspect previously the option may have been enabled globally. However the fix allows apache to run again and works after a clean shutdown and startup.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clearchain.com/blog/posts/solving-the-apache-ssl-error-oops-no-rsa-or-dsa-server-certificate-found-for-www-somedomain-com0/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>cgit upgrade &amp; gitweb retired</title>
		<link>http://www.clearchain.com/blog/posts/cgit-upgrade-gitweb-retired</link>
		<comments>http://www.clearchain.com/blog/posts/cgit-upgrade-gitweb-retired#comments</comments>
		<pubDate>Mon, 24 Nov 2008 02:49:05 +0000</pubDate>
		<dc:creator>Benjamin Close</dc:creator>
				<category><![CDATA[FreeDesktop]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cgit]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://www.clearchain.com/blog/?p=142</guid>
		<description><![CDATA[<a href="http://www.clearchain.com/blog/posts/cgit-upgrade-gitweb-retired"><img align="left" hspace="5" width="150" height="150" src="http://www.clearchain.com/blog/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png" class="alignleft wp-post-image tfe" alt="" title="" /></a>With CGit v0.8 supporting, atom feeds, patch targets and also the clone-url option, it&#8217;s time to finally rid ourselves of the memory hungry gitweb. Hence cgit.fd.o has been upgraded and gitweb been pointed to cgit.fd.o. There&#8217;s also a bucket load of redirects in place to support this. Hence all the old gitweb url&#8217;s should correctly<a href="http://www.clearchain.com/blog/posts/cgit-upgrade-gitweb-retired"> <font size=-2>[..more..]</font></a>]]></description>
			<content:encoded><![CDATA[<p>With<a href="http://hjemli.net/git/cgit/"> CGit</a> v0.8 supporting, atom feeds, patch targets and also the clone-url option, it&#8217;s time to finally rid ourselves of the memory hungry gitweb. Hence <a href="http://cgit.freedesktop.org/">cgit.fd.o</a> has been upgraded and gitweb been pointed to cgit.fd.o. There&#8217;s also a bucket load of redirects in place to support this. Hence all the old gitweb url&#8217;s should correctly translate into cgit urls.</p>
<p><span id="more-142"></span></p>
<p>Here&#8217;s the url redirect list in case someone else wants to use cgit over gitweb (highly recommended)</p>
<pre>&lt;VirtualHost *:80&gt;
        ServerName gitweb2.freedesktop.org
        ServerAdmin <a class="moz-txt-link-abbreviated" href="mailto:sitewranglers@freedesktop.org">sitewranglers@freedesktop.org</a>

        CustomLog /var/log/apache2/gitweb.freedesktop.org-access.log combined
        ErrorLog /var/log/apache2/gitweb.freedesktop.org-error.log

        #
        # Redirects mapping gitweb -&gt; cgit
        #
        # Gitweb uses get targets seperated by ;
        #
        # /?...;...;...
        #
        # p = Project
        # a = action ( blob, blob_plain, blobdiff, commitdiff, commit, shortlog, summary, tree, log, tag, history, rss)
        # h = SHA Hash
        # o = sort order
        # hb= SHA Hash Tree Base
        # hp= ?
        # pg= page
        # f= file/dir
        #
        # Cgit uses the following:
        #
        # <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>project/action<span class="moz-txt-tag">/</span></em>?...
        #
        # action ( commit, log, diff, tree, tag, patch  )
        #
        # id = SHA Hash
        # id2 = SHA Hash
        # h = head
        #
        # Translation rules
        #
        # Project is a straight redirect
        # ---
        # /?p=([^.]+).git;       <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/$1/">http://cgit.freedesktop.org/$1/</a>
        #
        # Action requires a mapping
        # ---
        # a=(blob|tree) <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>tree<span class="moz-txt-tag">/</span></em>
        # a=(blobdiff|commitdiff)       <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>diff<span class="moz-txt-tag">/</span></em>
        # a=commit      <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>commit<span class="moz-txt-tag">/</span></em>
        # a=(summary)   /
        # a=(shortlog|log|history)      <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>log<span class="moz-txt-tag">/</span></em>
        # a=tag         <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>tag<span class="moz-txt-tag">/</span></em>
        # a=blob_plain  <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>blob<span class="moz-txt-tag">/</span></em>
        # a=rss    ?No CGIT Equivilant?
        #
        # Targets require mapping
        # ---
        # h=([^;]+)     id=$1
        # f=([^;]+)     /$1
        # hb=([^;]+)    id2=$1
        # hp([^;]+      id=$1
        #
        # Now putting it all together
        #
        RewriteEngine On
        #RewriteLog /tmp/rewrite.log
        #RewriteLogLevel 5
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=blob;h=([^;]+);hb=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/%5?id=%3;id2=%4">http://cgit.freedesktop.org/%1/tree/%5?id=%3;id2=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=blob;hb=([^;]+);f=([^;]+)
        RewriteRule ^/$  <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/%4?id=%3">http://cgit.freedesktop.org/%1/tree/%4?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=tree;h=([^;]+);hb=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/%5?id=%4">http://cgit.freedesktop.org/%1/tree/%5?id=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=tree;h=([^;]+);hb=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/?id=%4">http://cgit.freedesktop.org/%1/tree/?id=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=tree;hb=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/?id=%3">http://cgit.freedesktop.org/%1/tree/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=tree
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/">http://cgit.freedesktop.org/%1/tree/</a>? [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=blobdiff;h=([^;]+);hp=([^;]+);hb=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/diff/%6?id2=%4;id=%3;id3=%5">http://cgit.freedesktop.org/%1/diff/%6?id2=%4;id=%3;id3=%5</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=commitdiff;h=([^;]+);hp=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/diff/?id=%4;id2=%3">http://cgit.freedesktop.org/%1/diff/?id=%4;id2=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=commitdiff;h=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/diff/?id=%3">http://cgit.freedesktop.org/%1/diff/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=commit;h=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/commit/?id=%3">http://cgit.freedesktop.org/%1/commit/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=shortlog;h=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/?id=%3">http://cgit.freedesktop.org/%1/log/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=shortlog
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/">http://cgit.freedesktop.org/%1/log/</a>? [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=log;h=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/?id=%3">http://cgit.freedesktop.org/%1/log/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=log
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log">http://cgit.freedesktop.org/%1/log</a>? [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=history;h=([^;]+);hb=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/%5?id=%4">http://cgit.freedesktop.org/%1/log/%5?id=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=history;h=([^;]+);hb=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/?id=%4">http://cgit.freedesktop.org/%1/log/?id=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=history;hb=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/%4?id=%3">http://cgit.freedesktop.org/%1/log/%4?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=history;hb=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/?id=%3">http://cgit.freedesktop.org/%1/log/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=tag;h=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tag/?id=%4">http://cgit.freedesktop.org/%1/tag/?id=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=blob_plain;h=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/blob/%4?id=%3">http://cgit.freedesktop.org/%1/blob/%4?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=blob_plain;f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/blob/%4">http://cgit.freedesktop.org/%1/blob/%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=rss
        RewriteRule ^/$ http://cgit.freedesktop.org/%1/atom? [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=summary
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/">http://cgit.freedesktop.org/%1/</a>? [R,L,NE]
        #
        # Fail safes incase nothing above matches, try at least to put the person in the project, els root of cgit
        RewriteCond %{query_string} p=([^.]+)(\.git)*.*
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/">http://cgit.freedesktop.org/%1/</a>? [R,L,NE]
        RewriteRule ^.* <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/">http://cgit.freedesktop.org/</a> [R,L,NE]
&lt;/VirtualHost&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.clearchain.com/blog/posts/cgit-upgrade-gitweb-retired/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Proxying a page/website through Apache</title>
		<link>http://www.clearchain.com/blog/posts/proxying-a-pagewebsite-through-apache</link>
		<comments>http://www.clearchain.com/blog/posts/proxying-a-pagewebsite-through-apache#comments</comments>
		<pubDate>Sat, 08 Nov 2008 01:54:02 +0000</pubDate>
		<dc:creator>Benjamin Close</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://www.clearchain.com/blog/?p=95</guid>
		<description><![CDATA[<a href="http://www.clearchain.com/blog/posts/proxying-a-pagewebsite-through-apache"><img align="left" hspace="5" width="150" height="150" src="http://www.clearchain.com/blog/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png" class="alignleft wp-post-image tfe" alt="" title="" /></a>Sometimes you want to expose one port in your firewall but not another. However, often you have different servers running on different ports. Apache has the ability to proxy pages, this allows one server to be externally visible with the other running only locally. It allows you to secure one server and only open one<a href="http://www.clearchain.com/blog/posts/proxying-a-pagewebsite-through-apache"> <font size=-2>[..more..]</font></a>]]></description>
			<content:encoded><![CDATA[<p>Sometimes you want to expose one port in your firewall but not another. However, often you have different servers running on different ports. Apache has the ability to proxy pages, this allows one server to be externally visible with the other running only locally. It allows you to secure one server and only open one port to external attacks. To setup this proxying put the following in your apache config file:</p>
<pre>    RewriteEngine on
    RewriteLog /SOMELOGFILE
    RewriteLogLevel 2
    RewriteRule ^/(.*)$ http://localhost:8180/$1 [P]
    ProxyPassReverse / http://localhost:8180/</pre>
<p>The above will proxy the entire domain to the server on the same machine running on port 8180. The <code>[P]</code> tells apache to use the <em>proxy</em> module to do the work. This is not a redirect but a proxy so it hides the internal URL with the external facing one. The <code>ProxyPassReverse</code> directive tells apache to do the rewrite of the URL to remove the <code>localhost:8180</code> bit back to the originating url</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clearchain.com/blog/posts/proxying-a-pagewebsite-through-apache/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing .htaccess Authentication Restrictions</title>
		<link>http://www.clearchain.com/blog/posts/removing-htaccess-authentication-restrictions</link>
		<comments>http://www.clearchain.com/blog/posts/removing-htaccess-authentication-restrictions#comments</comments>
		<pubDate>Sat, 08 Nov 2008 01:53:06 +0000</pubDate>
		<dc:creator>Benjamin Close</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.clearchain.com/blog/?p=92</guid>
		<description><![CDATA[<a href="http://www.clearchain.com/blog/posts/removing-htaccess-authentication-restrictions"><img align="left" hspace="5" width="150" height="150" src="http://www.clearchain.com/blog/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png" class="alignleft wp-post-image tfe" alt="" title="" /></a>Removing .htaccess Authentication Restrictions Have you ever found yourself needing to remove authentication from part of a website? This actually happens fairly regularly. The way you do it is as follows: .htaccess AuthType none Satisfy Any The AuthType none directive indicates apache should not prompt for a password, whilst the Satisfy Any directive tells apache<a href="http://www.clearchain.com/blog/posts/removing-htaccess-authentication-restrictions"> <font size=-2>[..more..]</font></a>]]></description>
			<content:encoded><![CDATA[<h2><span class="mw-headline">Removing .htaccess Authentication Restrictions </span></h2>
<p>Have you ever found yourself needing to <em>remove</em> authentication from part of a website? This actually happens fairly regularly. The way you do it is as follows:</p>
<p><code>.htaccess</code></p>
<pre>AuthType none
Satisfy Any</pre>
<p>The <em>AuthType none</em> directive indicates apache should not prompt for a password, whilst the <em>Satisfy Any</em> directive tells apache that is can now use other methods to authenticate the user. You may also have to add:</p>
<pre>Order Deny, Allow
Allow from All</pre>
<p>Which tells apache everyone is allowed to access the page.</p>
<p><a name="Proxying_a_page.2Fwebsite_through_Apache"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clearchain.com/blog/posts/removing-htaccess-authentication-restrictions/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

