<?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>Magoo &#187; Webservers</title>
	<atom:link href="http://morgangoose.com/blog/category/webservers/feed/" rel="self" type="application/rss+xml" />
	<link>http://morgangoose.com/blog</link>
	<description>affiliated with the society of blog bloggables</description>
	<lastBuildDate>Thu, 03 Jun 2010 12:58:38 +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>Fedora KVM with simple network forwards</title>
		<link>http://morgangoose.com/blog/2010/06/fedora-kvm-with-simple-network-forwards/</link>
		<comments>http://morgangoose.com/blog/2010/06/fedora-kvm-with-simple-network-forwards/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 03:52:43 +0000</pubDate>
		<dc:creator>Morgan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Webservers]]></category>

		<guid isPermaLink="false">http://morgangoose.com/blog/2010/06/fedora-kvm-with-simple-netowrk-forward/</guid>
		<description><![CDATA[Recently I&#8217;ve been teaching python to some high school students. It has been going well, but the development environment we had access to left a little bit to be desired. We were working with ages old solaris, vi only, and no real access to newer gnu (or other) tools. So a new setup was required, [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been teaching python to some high school students. It has been going well, but the development environment we had access to left a little bit to be desired. We were working with ages old solaris, vi only, and no real access to newer gnu (or other) tools. So a new setup was required, I went off to investigate.</p>
<p>I started with chroot, since a buddy, Daniel Thau, had used it extensively for running <a href="http://opensource.osu.edu/sites/default/files/chroottalk_0.pdf">multiple operating systems side by side</a>. He&#8217;d pointed me in the directions of <a href="http://people.redhat.com/~rjones/febootstrap/" target="_blank">febootstrap</a> and that seemed like it&#8217;d work fine. I was able to make a sandbox, get ssh running on 2022 and then have my dlink route that to my box. Success!</p>
<p>But I found that a bit messy, and a bit limited. I wanted to lock down how much of my resources they could use, and I didn&#8217;t want to have to give access to some of my root file systems directly; /proc, /dev, etc. So I looked around a bit more, and stumbled on using KVM indirectly via the new virt-manager toolset that fedora 12 and 13 provide. Installation was as simple as:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">yum <span style="color: #c20cb9; font-weight: bold;">install</span> qemu-kvm virt-manager virt-viewer python-virtinst</div></div>
<p>But it also seems that from the <a href="http://www.techotopia.com/index.php/Installing_and_Configuring_Fedora_KVM_Virtualization">techotopia article</a> I followed for some of this that one could also just do:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">yum groupinstall <span style="color: #ff0000;">'Virtualization'</span></div></div>
<p>I have to say it&#8217;s a pretty swank set of tools. It&#8217;s free, it works on KVM or Xen. KVM usage requires no special kernel and as such, no reboot. The setup was simple, and gave out a vnc port to connect to from the get go. It is also trivial to connect to a setup on machine A with virt-manager on machine B over ssh. If you want more information, <a href="http://fedoraproject.org/wiki/Virtualization_Quick_Start">fedora has a nice writeup</a>, and libvirt has a more <a href="http://wiki.libvirt.org/page/Main_Page">distro agnostic set of docs</a>.</p>
<p>Problem was though that the networking was virtual, and didn&#8217;t pull an IP address from my router, so it wasn&#8217;t public. There were a few sections here and there describing how to switch to bridged, and I tried them. They didn&#8217;t work for me, either I suck at following directions, or they just won&#8217;t work how I expect them to. You can see for yourself <a href="http://wiki.libvirt.org/page/Networking#Fedora.2FRHEL_Bridging">here</a> at how I attempted network bridging.</p>
<p>What I did was much more in my realm of knowledge, is simpler than all the other options, and is something I can make changes to w/o killing my network connectivity. iptables! I just used NAT forwarding. It was 2 lines, put in my pre-existing firewall script. So to get my local box 192.168.1.199 on port 2022 to forward to its internal virtual network of 192.168.100.2 at port 22 was as plain as this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">iptables <span style="color: #660033;">-t</span> nat <span style="color: #660033;">-I</span> PREROUTING <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">2022</span> <span style="color: #660033;">-j</span> DNAT <span style="color: #660033;">--to-destination</span> 192.168.100.2:<span style="color: #000000;">22</span><br />
iptables <span style="color: #660033;">-I</span> FORWARD <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">22</span> <span style="color: #660033;">-d</span> 192.168.100.2 <span style="color: #660033;">-j</span> ACCEPT</div></div>
<p>One preroute rule to grab the port incoming, and one forward rule to pass said packets along. Now I have connectivity into my class virtual machine, and I don&#8217;t have to do much to add more ports as needed. I am pretty happy with the setup so far. It&#8217;s really nice to be able to connect remotely, vnc or ssh now, as well as know that I&#8217;ve limited the ram and cpu time the class can use on my box. I am interested to hear if anyone else is doing similar things with virtualization on their desktops.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgangoose.com/blog/2010/06/fedora-kvm-with-simple-network-forwards/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Trac makes my life easy</title>
		<link>http://morgangoose.com/blog/2009/07/trac-makes-my-life-easy/</link>
		<comments>http://morgangoose.com/blog/2009/07/trac-makes-my-life-easy/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 22:15:23 +0000</pubDate>
		<dc:creator>Morgan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Webservers]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[bitten]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://morgangoose.com/blog/?p=43</guid>
		<description><![CDATA[The project management app Trac is something that was new to me a while back. I’d just installed t for a side project, and used the yum install without any issues. It took care of all the grunt work, and got me to the point where I could now create and use a trac project. [...]]]></description>
			<content:encoded><![CDATA[<p>The project management app <a href="http://trac.edgewall.org">Trac</a> is something that was new to me a while back. I’d just installed t for a side project, and used the yum install without any issues. It took care of all the grunt work, and got me to the point where I could now create and use a trac project.</p>
<p>Trac is set up like what I see web frameworks go with. A main program that will install the framework in a project directory. In this case trac-admin , which is killer when you want to make multiple projects, and offers a cli interface to the project’s framework configuration, etc.</p>
<p>This setup becomes awesome I found when you want to upgrade. Yum installed what it had packaged, the .10 version, but I had decided that I wanted to toy with <a href="http://bitten.edgewall.org">bitten</a> their automated build tool, which required .11 and up. So an upgrade was needed, yum couldn’t be used, but I found that trac-admin has an upgrade command.</p>
<p>So I was poised to make the fun and scary transition into mixing a package managed install with a source install, not something that always goes well. I’ve found that sometimes packagers change to install location from where the src install goes (looking at you nagios), and make some conflicts or at least confusion.</p>
<p>The upgrade process for the server then my app was as simple as:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>ftp.edgewall.com<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span>Trac-0.11.5.tar.gz<br />
<span style="color: #c20cb9; font-weight: bold;">tar</span> zxvf http:<span style="color: #000000; font-weight: bold;">//</span>ftp.edgewall.com<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span>Trac-0.11.5.tar.gz<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> Trac-0.11.5<br />
python setup.py <span style="color: #c20cb9; font-weight: bold;">install</span><br />
trac-admin <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>project upgrade<br />
trac-admin <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>project wiki upgrade<br />
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>httpd restart</div></div>
<p>This blew me away. I’ve have never had a complicated app (relativily of course) upgrade so simply, and without any issues. The main install of trac from empty folder to working project manager was simple too, so perhaps I should have expected this, but really I think it is a testimony to how well the developers of Trac have though of the whole process of using their framework.</p>
<p>Links:<br />
<a href="http://trac.edgewall.org/">http://trac.edgewall.org/</a><br />
<a href="http://bitten.edgewall.org/">http://bitten.edgewall.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://morgangoose.com/blog/2009/07/trac-makes-my-life-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Authenticating svn and trac with wordpress</title>
		<link>http://morgangoose.com/blog/2009/05/authenticating-svn-and-trac-with-wordpress/</link>
		<comments>http://morgangoose.com/blog/2009/05/authenticating-svn-and-trac-with-wordpress/#comments</comments>
		<pubDate>Thu, 07 May 2009 19:05:16 +0000</pubDate>
		<dc:creator>Morgan</dc:creator>
				<category><![CDATA[Webservers]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[trac]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://morgangoose.com/blog/?p=15</guid>
		<description><![CDATA[Problem caused by wordpress upgrade My club uses WordPress and I have our forums and subversion authenticate via the wordpress install&#8217;s user table. This became very useful, and something that I tried to make sure I could apply on any new app I would install for the site. When trying to get the same thing [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem caused by wordpress upgrade</strong></p>
<p><strong></strong>My club uses WordPress and I have our forums and subversion authenticate via the wordpress install&#8217;s user table. This became very useful, and something that I tried to make sure I could apply on any new app I would install for the site. </p>
<p>When trying to get the same thing setup for an install of Trac I had just made I ran into a bit of trouble.  With the old versions of wordpress this was pretty simple to do. Just a few lines in an apache conf file and we were golden.</p>
<p>With the most recent revisions though their implementation of password storage changed, causing the old setup to break for svn, and causing me a nice headache when trying to duplicate my old fix for svn onto trac.  They went from a simple md5 hash to using a much more secure phpass. (why it isn&#8217;t phppass I don&#8217;t know)</p>
<p>The main problem with this is that this isn&#8217;t an authentication encryption that apache&#8217;s mysql handler could use.  I tried to find a work around to get back to md5, but I couldn&#8217;t find any. It was probably for the best anyhow, as I&#8217;d rather the site be more secure, than have more tools. No point in propagating something that could be exploited. Searching around some more I found the awesome work of <a href="http://nikolay.bg/" target="_blank">Nikolay</a>. given out on <a href="http://barry.wordpress.com/2008/05/19/mod_auth_mysql-and-phpass/" target="_blank">Barry&#8217;s</a> blog, and explaining the install process.  Nikolay made an apache module to compile that added in the ability to use phpass. This compiled great and worked with the fedora install the server is on,  so the old fix for subversion was working again, with a single line changed.</p>
<p><strong>Subversion</strong></p>
<div class="codecolorer-container apache vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="apache codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #00007f;">RedirectMatch</span> ^(/repos)$ $<span style="color: #ff0000;">1</span>/<br />
&lt;<span style="color: #000000; font-weight:bold;">Location</span> /repos/&gt;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #00007f;">Options</span> <span style="color: #0000ff;">all</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #00007f;">DAV</span> svn<br />
&nbsp; &nbsp; &nbsp;<span style="color: #00007f;">SVNParentPath</span> /repos/gcc/<br />
&nbsp; &nbsp; &nbsp;<span style="color: #00007f;">SVNListParentPath</span> <span style="color: #0000ff;">on</span><br />
<br />
&nbsp; &nbsp; &nbsp;<span style="color: #00007f;">AuthName</span> <span style="color: #7f007f;">&quot;MySQL authentication for SVN&quot;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #00007f;">AuthType</span> Basic<br />
&nbsp; &nbsp; &nbsp;<span style="color: #00007f;">Require</span> valid-<span style="color: #00007f;">user</span><br />
<br />
&nbsp; &nbsp; &nbsp;AuthMYSQLEnable <span style="color: #0000ff;">on</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #00007f;">AuthBasicAuthoritative</span> <span style="color: #0000ff;">off</span><br />
&nbsp; &nbsp; &nbsp;AuthMySQLAuthoritative <span style="color: #0000ff;">on</span><br />
<br />
&nbsp; &nbsp; &nbsp;AuthMySQLHost localhost<br />
&nbsp; &nbsp; &nbsp;AuthMySQLUser <span style="color: #00007f;">user</span><br />
&nbsp; &nbsp; &nbsp;AuthMySQLPassword password<br />
&nbsp; &nbsp; &nbsp;AuthMySQLDB wordpress_db<br />
&nbsp; &nbsp; &nbsp;AuthMySQLUserTable wp_users<br />
&nbsp; &nbsp; &nbsp;AuthMySQLNameField user_login<br />
&nbsp; &nbsp; &nbsp;AuthMySQLPasswordField user_pass<br />
&nbsp; &nbsp; &nbsp;AuthMySQLPwEncryption phpass<br />
&lt;/<span style="color: #000000; font-weight:bold;">Location</span>&gt;<br />
<span style="color: #00007f;">CustomLog</span> logs/svn_logfile <span style="color: #7f007f;">&quot;%t %u %{SVN-ACTION}e&quot;</span> env=SVN-<span style="color: #00007f;">ACTION</span></div></div>
<p>That is the config that makes sure that only people that have accounts on the wordpress blog can have access to the repos. I plan on soon adding in a SVN auth file to make the commit users  more constrained, but at the moment, it isn&#8217;t a priority.</p>
<p>The last line makes nice entries of SVN access in its own log file, which is very handy for debugging problems.</p>
<p><strong>Trac</strong></p>
<p>For trac I took the simple apache auth they provided on their website, and applied the same idea from svn to it:</p>
<div class="codecolorer-container apache vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="apache codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;<span style="color: #000000; font-weight:bold;">Location</span> <span style="color: #7f007f;">&quot;/projects/project-name/login&quot;</span>&gt;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #00007f;">AuthType</span> Basic<br />
&nbsp; &nbsp; &nbsp;<span style="color: #00007f;">Require</span> valid-<span style="color: #00007f;">user</span><br />
<br />
&nbsp; &nbsp; &nbsp;<span style="color: #00007f;">AuthName</span> <span style="color: #7f007f;">&quot;Trac Auth&quot;</span><br />
&nbsp; &nbsp; &nbsp;AuthMYSQLEnable <span style="color: #0000ff;">on</span><br />
&nbsp; &nbsp; &nbsp;AuthMySQLAuthoritative <span style="color: #0000ff;">on</span><br />
&nbsp; &nbsp; &nbsp;AuthMySQLHost localhost<br />
&nbsp; &nbsp; &nbsp;AuthMySQLUser wordpress<br />
&nbsp; &nbsp; &nbsp;AuthMySQLPassword password<br />
&nbsp; &nbsp; &nbsp;AuthMySQLDB wordpress_db<br />
&nbsp; &nbsp; &nbsp;AuthMySQLUserTable wp_users<br />
&nbsp; &nbsp; &nbsp;AuthMySQLNameField user_login<br />
&nbsp; &nbsp; &nbsp;AuthMySQLPasswordField user_pass<br />
&nbsp; &nbsp; &nbsp;AuthMySQLPwEncryption phpass<br />
&lt;/<span style="color: #000000; font-weight:bold;">Location</span>&gt;</div></div>
<p>I plan to use this type of database integration more, specifically with a wiki installation. Although I don&#8217;t know of any wiki that could use this type of authentication as I am only familiar with mediawiki, and really only as a user.</p>
<p><strong>Links</strong></p>
<ul>
<li>http://barry.wordpress.com/2008/05/19/mod_auth_mysql-and-phpass/</li>
<li>http://nikolay.bg/</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://morgangoose.com/blog/2009/05/authenticating-svn-and-trac-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
