<?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>Note to Self &#187; Server Configuration</title>
	<atom:link href="http://notetoself.vrensk.com/category/server-configuration/feed/" rel="self" type="application/rss+xml" />
	<link>http://notetoself.vrensk.com</link>
	<description>lest I forget</description>
	<lastBuildDate>Fri, 23 Feb 2018 12:54:38 +0000</lastBuildDate>
	<language>sv-SE</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Don&#8217;t use Loopia for free email forwarding</title>
		<link>http://notetoself.vrensk.com/2010/10/dont-use-loopia-for-free-email-forwarding/</link>
		<comments>http://notetoself.vrensk.com/2010/10/dont-use-loopia-for-free-email-forwarding/#comments</comments>
		<pubDate>Wed, 13 Oct 2010 09:13:59 +0000</pubDate>
		<dc:creator>David Vrensk</dc:creator>
				<category><![CDATA[Server Configuration]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[email forwarding]]></category>
		<category><![CDATA[Loopia]]></category>

		<guid isPermaLink="false">http://notetoself.vrensk.com/?p=79</guid>
		<description><![CDATA[Swedish ISP Loopia offers free email forwarding for any domain for which they handle DNS.  Unfortunately, this includes a spam filter that the customer cannot turn off, unless they pay, which means it&#8217;s not free anymore. So what&#8217;s wrong with some free spam filtering?  Well, this is what happened: A prospective client sent an email with [...]]]></description>
				<content:encoded><![CDATA[<p>Swedish ISP <a href="http://www.loopia.se/" onclick="pageTracker._trackPageview('/outgoing/www.loopia.se/?referer=http%3A%2F%2Fnotetoself.vrensk.com%2Fcategory%2Fserver-configuration%2Ffeed');">Loopia</a> offers free email forwarding for any domain for which they handle DNS.  Unfortunately, this includes a spam filter that the customer cannot turn off, unless they pay, which means it&#8217;s not free anymore.</p>
<p>So what&#8217;s wrong with some free spam filtering?  Well, this is what happened:</p>
<ol>
<li>A prospective client sent an email with a proposition.</li>
<li>Loopia&#8217;s spam filter found the proposition suspect <em>and bounced it</em>.</li>
<li>The client saw a bounce and thought that they had the wrong email address and gave up.</li>
</ol>
<p>This probably lead to lost business.  I can&#8217;t blame Loopia, but I can stop using them.</p>
]]></content:encoded>
			<wfw:commentRss>http://notetoself.vrensk.com/2010/10/dont-use-loopia-for-free-email-forwarding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keeping Fedora 6 going after end-of-life</title>
		<link>http://notetoself.vrensk.com/2009/06/keeping-fedora-6-going-after-end-of-life/</link>
		<comments>http://notetoself.vrensk.com/2009/06/keeping-fedora-6-going-after-end-of-life/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 16:38:21 +0000</pubDate>
		<dc:creator>David Vrensk</dc:creator>
				<category><![CDATA[Server Configuration]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://notetoself.vrensk.com/?p=53</guid>
		<description><![CDATA[All hackers want to live on the edge. What we rarely reflect on is the fact that most things have more than one edge. Adaptation curves have two: one where the early adopters build up their reputation for cool and one where I found myself this afternoon. Apparently I should have let go of Fedora [...]]]></description>
				<content:encoded><![CDATA[<p>All hackers want to live on the edge.  What we rarely reflect on is the fact that most things have more than one edge.  Adaptation curves have two: one where the early adopters build up their reputation for cool and one where I found myself this afternoon.</p>
<p>Apparently I should have let go of Fedora 6 some time ago.  I installed this particular server in December 2006 when FC6 was the cool new girl on the block, and it has been running smoothly since then.  But today when I tried to (<code>yum</code>) install a package, there were no servers to be found:</p>
<pre><code># yum search libxslt-devel
Loading "installonlyn" plugin
Setting up repositories

http://archive.kernel.org/fedora-archive/fedora/linux/core/6/i386/os/repodata/repomd.xml:

  [Errno 14] HTTP Error 404: Server: nginx/0.5.0
...
Trying other mirror.
core                      100% |=========================| 1.1 kB    00:00
Error: Cannot find a valid baseurl for repo: extras
</code></pre>
<p>Oops.  I looked in <code>/etc/yum.repos.d/fedora-extras.repo</code> which is provides the base URL:</p>
<pre><code>[extras]
name=Fedora Extras $releasever - $basearch
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=extras-$releasever&amp;arch=$basearch
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1
</code></pre>
<p>In earlier experience, the problem has been that the DNS service for the repo that <code>mirrorlist</code> recommends is down, and this is what some googling suggested too.  So I went to <a href="http://mirrors.fedoraproject.org/mirrorlist?repo=extras-6&amp;arch=i386" onclick="pageTracker._trackPageview('/outgoing/mirrors.fedoraproject.org/mirrorlist?repo=extras-6_amp_arch=i386&amp;referer=http%3A%2F%2Fnotetoself.vrensk.com%2Fcategory%2Fserver-configuration%2Ffeed');">mirrors.fedoraproject.org</a> to see what it said.  The answer surprised me:</p>
<pre><code># repo = extras-6 arch = i386 error: invalid repo or arch
# following repositories are available:
# repo=core-2, arch=i386
# repo=core-2, arch=x86_64
# ...
# repo=core-6, arch=x86_64
# ...
</code></pre>
<p>So <code>core-6</code> is in the list but <code>extras-6</code> is not.  I tried some different combinations thinking I had got it wrong, but to no avail.  Instead, on a whim, I checked out the <a href="http://mirrors.fedoraproject.org/" onclick="pageTracker._trackPageview('/outgoing/mirrors.fedoraproject.org/?referer=http%3A%2F%2Fnotetoself.vrensk.com%2Fcategory%2Fserver-configuration%2Ffeed');">site’s root</a> where I could navigate to a human-readable <a href="http://mirrors.fedoraproject.org/publiclist/Fedora/6/i386/" onclick="pageTracker._trackPageview('/outgoing/mirrors.fedoraproject.org/publiclist/Fedora/6/i386/?referer=http%3A%2F%2Fnotetoself.vrensk.com%2Fcategory%2Fserver-configuration%2Ffeed');">list of mirrors</a> and I started checking them out one by one.  Uni-Bayreuth seemed to have what I wanted, so I edited <code>fedora-extras.repo</code> like this:</p>
<pre><code>[extras]
name=Fedora Extras $releasever - $basearch
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=extras-$releasever&amp;arch=$basearch
baseurl=http://ftp.uni-bayreuth.de/linux/fedora/linux/extras/$releasever/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1
</code></pre>
<p>and ran <code>yum search libxslt-devel</code> again.  This time it complained about <code>updates</code> instead (<code>Error: Cannot find a valid baseurl for repo: updates</code>).  Unfortunately Bayreuth didn’t have the updates catalog which sent me searching in a few other places until I finally decided to try to make do without it by setting <code>enabled=0</code> in <code>fedora-updates.repo</code>:</p>
<pre><code>[updates]
name=Fedora Core $releasever - $basearch - Updates
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-fc$releasever&amp;arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
</code></pre>
<p>It worked, and I was able to install the packages I wanted, but I really need to get myself a newer OS.  I’ll combine that with a move to another host; FS-data have let me down once too many, and I’ve never fancied upgrading the OS on a production server anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://notetoself.vrensk.com/2009/06/keeping-fedora-6-going-after-end-of-life/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Apache with PHP on FC6</title>
		<link>http://notetoself.vrensk.com/2008/07/apache-with-php-on-fc6/</link>
		<comments>http://notetoself.vrensk.com/2008/07/apache-with-php-on-fc6/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 18:00:08 +0000</pubDate>
		<dc:creator>David Vrensk</dc:creator>
				<category><![CDATA[Server Configuration]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[FC6]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[private DNS]]></category>
		<category><![CDATA[SELinux]]></category>

		<guid isPermaLink="false">http://notetoself.vrensk.com/?p=7</guid>
		<description><![CDATA[I acquired this server in December 2006 to host a few Rails projects and one of the first things I did was to disable Apache and install Nginx.  Once I decided to use WordPress for this blog, I needed PHP, and while I could have tried to set up PHP for Nginx, I decided to [...]]]></description>
				<content:encoded><![CDATA[<p>I acquired this server in December 2006 to host a few <a href="http://www.rubyonrails.org/" onclick="pageTracker._trackPageview('/outgoing/www.rubyonrails.org/?referer=http%3A%2F%2Fnotetoself.vrensk.com%2Fcategory%2Fserver-configuration%2Ffeed');">Rails</a> projects and one of the first things I did was to disable Apache and install Nginx.  Once I decided to use WordPress for this blog, I needed PHP, and while I could have tried to set up PHP for Nginx, I decided to go the easy route and use the familiar LAMP combo.  I have after all used Apache in various guises ever since it was the Cern httpd back in 1993, so it should be no match for me.</p>
<p>Not so.  But to make a long story short and save myself some time next time around, here are the mistakes I made:</p>
<h2>Private DNS</h2>
<p>My wardrobe server (on my home network) hosts a number of public-facing web servers; little things that I set up for friends before I started doing web work professionally.  So, for instance www.norbusam.org points to my fixed home IP, and all traffic on port 80 is forwarded to my server.  The WGR614 that I use for NAT and routing is not smart enough to let me use the public interface from the private part of the network, i.e. if I sit at my desk at home and enter www.norbusam.org into my web browser, I won&#8217;t get anywhere.  That would have annoyed me if I hadn&#8217;t liked the solution so much: I set up a DNS daemon on the home server and let it trick all home computers to use the internal interface (192.168.x.y) for norbusam.org and others.  Easy as pie.</p>
<p>This came back to bite me for hours on end last night.  notetoself.vrensk.com was pointing at my home server, so while I was hacking the Apache settings on this server and reloading my browser furiously, all I got was my home server.  And since both run Apache, I never got suspicious—it just looked like my changes didn&#8217;t take.  Ouch.</p>
<h2>SELinux</h2>
<p>This server is running Security Enhanced Linux out of the box.  I asked for a vanilla install of FC6, and apparently SELinux is switched on by default.  I decided to keep it on when I got the server since I saw it as a learning opportunity.  It caused me some problems when I set up Postfix when the server was new, but I sorted it out and haven&#8217;t thought about it since then.</p>
<p>This, too, came back to bite me for a couple of hours.  It turns out that the default setting of SE for Apache are somewhere between frugal and paranoid.  There are various security bits to be set or cleared, and the default setting assumes that I only want to publish pages from a root-blessed directory and that I don&#8217;t want to run any scripts, use a database or have httpd talk to any other servers out there.  Rather than go through all these settings one by one and reverse them (and risk disabling something that was actually permissive to start with) I decided to turn off SELinux for Apache:</p>
<pre># setsebool -P httpd_disable_trans 1</pre>
<p>Followed by a restart (not reload) of Apache.  I&#8217;m indebted to <a href="http://beginlinux.com/index.php/server_training/web-server/117-web-server/976-apache-and-selinux" onclick="pageTracker._trackPageview('/outgoing/beginlinux.com/index.php/server_training/web-server/117-web-server/976-apache-and-selinux?referer=http%3A%2F%2Fnotetoself.vrensk.com%2Fcategory%2Fserver-configuration%2Ffeed');">an article at Begin Linux</a> for this solution.  I can&#8217;t recommend reading the actual article though, as it is just a long recapitulation of man pages and other documentation without a trace of explanation or even a try to put things in context.</p>
<p>Oh well.  Next time I will make sure to double check my IPs and disable SELinux at least while setting up a system.</p>
]]></content:encoded>
			<wfw:commentRss>http://notetoself.vrensk.com/2008/07/apache-with-php-on-fc6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
