<?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>Dazzle CMS &#187; berkeley</title>
	<atom:link href="http://blog.dazzlecms.com/category/servers/database/berkeley/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dazzlecms.com</link>
	<description>Dazzle Development Blog</description>
	<lastBuildDate>Tue, 10 Aug 2010 22:15:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>svn + apache2</title>
		<link>http://blog.dazzlecms.com/php/svn-apache2/</link>
		<comments>http://blog.dazzlecms.com/php/svn-apache2/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 00:20:50 +0000</pubDate>
		<dc:creator>Dazzle CMS</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[Neon]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[berkeley]]></category>

		<guid isPermaLink="false">http://blog.dazzlecms.com/?p=12</guid>
		<description><![CDATA[Many of my developers work from windows including myself. Creating secure access over ssh and svn (svn+ssh://) using Zend studio and svn (subversion plugin for zend) was the initial idea, from a quick pass over subversion, but once svnserver was up and running and I tried it, this wasn’t as simple. There are several articles [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.dazzlecms.com%2Fphp%2Fsvn-apache2%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.dazzlecms.com%2Fphp%2Fsvn-apache2%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Many of my developers work from windows including myself. Creating secure access over ssh and svn (svn+ssh://)<br />
using Zend studio and svn (subversion plugin for zend) was the initial idea, from a quick pass over subversion, but once svnserver was up and running and I tried it, this wasn’t as simple. There are several articles on integrating subversion, ssh and windows. None of the solutions looked simple or elegant. And wide open unsecured traffic was not acceptable.</p>
<p>I determined best practice pointed us to subversion access through web_dav_svn -&gt; web_dav -&gt; apache2 (https://). This brought authentication away from centralized auth and allowed fine grained control over the access granted via htpasswd and .htaccess files. It allowed us to restrict unsecured access and redirect http to https, and encrypt using SSL. It kept us from having to work ssh onto windows for each developer, instead we could have a simple eclipse/subclipse plugin access demonstrated and from that point they were able to customize on their own.</p>
<p>What I wanted was:</p>
<p>* untar subversion-1.6.6 and subversion-deps-1.6.6 in /apps/src (they layer over each other)<br />
* first build and install the -deps apr and apr-util into /apps/local<br />
* then build apache2 against /usr/local/apr and /usr/local/apr-util<br />
* install apache2<br />
* build and install serf<br />
* remove serf, apr, and apr-util subdirectories and source code from within subversion-1.6.6<br />
* build 1.6.6 against apxs in apache, without Berkeley DB, without neon, and specifying /usr/local/apr, /usr/local/apr-util, and /usr/local/serf<br />
* install and test</p>
<p>process</p>
<p>* create subdirectory /apps/src, place all tarballs in this directory<br />
* untar subversion &amp; subversion-deps version 1.6.6 (these tar onto each other)<br />
* cd subversion-1.6.6/apr<br />
* ./configure &#8211;prefix=/usr/local/subversion/apr<br />
* make &amp;&amp; make install<br />
* cd ../apr-util<br />
* ./configure &#8211;prefix=/usr/local/subversion/apr-util &#8211;with-apr=/usr/local/subversion/apr<br />
* make &amp;&amp; make install<br />
* cd ../neon<br />
* ./configure &#8211;prefix=/usr/local/subversion/neon<br />
*<br />
* apache2: untar httpd-2.2.14<br />
* ./configure &#8211;prefix=/usr/local/subversion/apache &#8211;enable-dav &#8211;enable-dav-fs &#8211;enable-dav-lock &#8211;enable-expires &#8211;enable-headers &#8211;enable-info &#8211;enable-logio &#8211;enable-proxy &#8211;enable-rewrite &#8211;enable-unique-id &#8211;with-apr=/usr/local/subversion/apr &#8211;with-apr-util=/usr/local/subversion/apr-util &#8211;enable-so &#8211;enable-mods-shared=all<br />
* make &amp;&amp; make install</p>
<p>This way apache2 builds against apr and apr-util compatible with subversion 1.6.6<br />
and then build subversion against it as well..<br />
* ln -s /apps/apache2_2.2.14 /apps/apache2<br />
* compile and install serf<br />
* ./configure –-prefix=/usr/local/subversion/serf &#8211;with-apr=/usr/local/subversion/apr &#8211;with-apr-util=/usr/local/subversion/apr-util<br />
* make &amp;&amp; make install<br />
* remove serf, pr and apr-util from subversion</p>
<p>compile subversion</p>
<p>./configure –prefix=/apps/svn –with-ssl –with-libs=/usr/local/ssl –without-berkeley-db –with-apxs=/apps/apache2/bin/apxs –with-openssl=/usr/local/ssl –without-neon –with-serf=/usr/local/serf –with-apr=/usr/local/apr –with-apr-util=/usr/local/apr-util</p>
<p>make &amp;&amp; make install</p>
<p>test:</p>
<p>/usr/local/subversion/svn/bin/svnadmin create /usr/local/subversion/repository</p>
<p>chown subversion:subversion /usr/local/subversion</p>
<p>chown -Rv subversion.subversion /usr/local/subversion</p>
<p>root@dedicated[/bin] $</p>
<p>no core dump…</p>
<p>ONWARD to configure and test apache2 and subversion…<br />
httpd.conf:</p>
<p>* change all references to apache2_2.2.14 to apache2 (makes the httpd.conf generic rather than subject to needing a migration after a point release upgrade…)<br />
* change port 80 to a non-priveliged port (8080)<br />
* check for<br />
o LoadModule dav_module modules/mod_dav.so<br />
o LoadModule dav_module modules/mod_dav.so<br />
o LoadModule ssl_module modules/mod_ssl.so<br />
* add in ServerName hostname.domain.com:8443 Some of the apache level sanity validation requires a statement of the local host.<br />
* add in SSL stuff (this IS httpd from source &#8211; the default httpd.conf had the ssl-module load statement, but no explicit SSL configuration</p>
<p>#<br />
# Note: The following must must be present to support<br />
# starting without SSL on platforms with no /dev/random equivalent<br />
# but a statically compiled-in mod_ssl.<br />
#</p>
<p>&lt;IfModule ssl_module&gt;<br />
SSLRandomSeed startup builtin<br />
SSLRandomSeed connect builtin<br />
&lt;/IfModule&gt;</p>
<p># =================================================<br />
# SSL/TLS settings<br />
# =================================================</p>
<p>Listen 0.0.0.0:8080<br />
Listen 0.0.0.0:8443</p>
<p>SSLEngine on<br />
#SSLOptions +StrictRequire</p>
<p>#&lt;Directory /&gt;<br />
# SSLRequireSSL<br />
#&lt;/Directory&gt;</p>
<p>SSLProtocol -all +TLSv1 +SSLv3<br />
SSLCipherSuite HIGH:MEDIUM:!aNULL:+SHA1:+MD5:+HIGH:+MEDIUM</p>
<p>SSLMutex file:/apps/apache2/logs/ssl_mutex</p>
<p>SSLRandomSeed startup file:/dev/urandom 1024<br />
SSLRandomSeed connect file:/dev/urandom 1024</p>
<p>SSLSessionCache shm:/apps/apache2/logs/ssl_cache_shm<br />
SSLSessionCacheTimeout 600</p>
<p>SSLPassPhraseDialog builtin<br />
SSLCertificateFile /apps/apache2/conf/ssl.crt/server.crt<br />
SSLCertificateKeyFile /apps/apache2/conf/ssl.key/server.key</p>
<p>SSLVerifyClient none<br />
SSLProxyEngine off</p>
<p>&lt;IfModule mime.c&gt;<br />
AddType application/x-x509-ca-cert .crt<br />
AddType application/x-pkcs7-crl .crl<br />
&lt;/IfModule&gt;</p>
<p>* create ssl certificate (self-signed). I installed in /apps/apache2/conf/ssl.crt and ssl.key, naming the .crt and ,key files for the server hostname and then symbolically linking them to the generic “server.crt” and “server.key”.<br />
* restart apache2 and test https://host:8443/ &#8211; you should get the “It works!” apache test page, thus validating the SSL certificate and setup from a browser level<br />
*<br />
* parent directory for svn</p>
<p>&lt;Location /svn&gt;<br />
DAV svn<br />
SVNParentPath /apps/repos<br />
&lt;/Location&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dazzlecms.com/php/svn-apache2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
