<?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>That Matt &#187; Web Servers</title>
	<atom:link href="http://that-matt.com/category/web-servers/feed/" rel="self" type="application/rss+xml" />
	<link>http://that-matt.com</link>
	<description>That one, not this one!</description>
	<lastBuildDate>Tue, 25 Oct 2011 00:57:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Puppet: Retrieved certificate does not match private key</title>
		<link>http://that-matt.com/2010/08/puppet-retrieved-certificate-does-not-match-private-key/</link>
		<comments>http://that-matt.com/2010/08/puppet-retrieved-certificate-does-not-match-private-key/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 22:08:52 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Virtualisation]]></category>
		<category><![CDATA[Web Servers]]></category>
		<category><![CDATA[puppet]]></category>
		<category><![CDATA[server provisioning]]></category>

		<guid isPermaLink="false">http://that-matt.com/?p=163</guid>
		<description><![CDATA[I&#8217;ve been playing around with puppet recently and while trying to start up a client and get it to talk to the server I ran into this error: err: Could not request certificate: Retrieved certificate does not match private key; &#8230; <a href="http://that-matt.com/2010/08/puppet-retrieved-certificate-does-not-match-private-key/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with puppet recently and while trying to start up a client and get it to talk to the server I ran into this error:</p>
<pre class="brush:bash">err: Could not request certificate: Retrieved certificate does not match private key; please remove certificate from server and regenerate it with the current key</pre>
<p>Apparently the root cause of this error is that the client&#8217;s ssl certificates have been messed up.</p>
<p>To fix it you have to remove all of the client&#8217;s ssl stuff &#8211; cd into the directory containing all the ssl info &#8211; /etc/puppet/ssl for me running a manual install of puppet 2.6 &#8211; and remove all files, in all sub-directories, apart from &#8216;ca/serial&#8217;, which should contain 0000.</p>
<p>Then on the server revoke the client&#8217;s ssl certificate using:</p>
<pre class="brush:bash">sudo pupetca --clean {client hostname}</pre>
<p>Then restart the client, resign it on the server and you&#8217;re good to go!</p>
]]></content:encoded>
			<wfw:commentRss>http://that-matt.com/2010/08/puppet-retrieved-certificate-does-not-match-private-key/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Config cache problems with Magento</title>
		<link>http://that-matt.com/2010/08/config-cache-problems-with-magento/</link>
		<comments>http://that-matt.com/2010/08/config-cache-problems-with-magento/#comments</comments>
		<pubDate>Sun, 01 Aug 2010 19:18:00 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Web Apps]]></category>
		<category><![CDATA[Web Servers]]></category>
		<category><![CDATA[magento]]></category>

		<guid isPermaLink="false">http://that-matt.com/?p=158</guid>
		<description><![CDATA[After having numerous problems upgrading a Magento site 1.4.1.1 on a test server I decided to try and get it working locally before applying the fix(es) to the live server. This is a fairly simple process and there&#8217;s lots of &#8230; <a href="http://that-matt.com/2010/08/config-cache-problems-with-magento/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After having numerous problems upgrading a Magento site 1.4.1.1 on a test server I decided to try and get it working locally before applying the fix(es) to the live server.</p>
<p>This is a fairly simple process and there&#8217;s <a href="http://blog.chandanweb.com/magento/how-to-change-base-url-in-magento">lots</a> of <a href="http://www.magentocommerce.com/wiki/groups/227/moving_magento_to_another_server">information</a> on how to do it.  The key steps in the process are emptying magento&#8217;s cache directory and updating the base urls in the core_config_data table so that magento will generate correct urls.</p>
<p><span id="more-158"></span></p>
<p>When I setup my copy of the site locally I changed local.xml &amp; deleted the cache before modifying the db, just to make sure that magento was connecting ok.  Once that was done I went off to delete the new cache files from siteroot/var/cache.  Only, there weren&#8217;t any cache files.  I took no note of it figuring magento had just decided not to cache the files and so proceeded to load the site, only for it to redirect me to the live site.</p>
<p>I spent the next few hours trying in vain to work out where magento was getting the idea that it should redirect to the main site.  After wiping the db / files and re-extracting them several times I noticed that it was still redirecting even if the database was empty and the cache dir (var/cache) didn&#8217;t exist.  Obviously this is one helluva wtf, especially as there weren&#8217;t any references to the live site&#8217;s address in the files.  The opinion on IRC was that somehow my local site was talking to the production site&#8217;s db and was using it&#8217;s database instead of my local one, however this couldn&#8217;t be the case as magento started complaining if I dropped the local database entirely.</p>
<p>In a last ditch attempt I tried grepping for the site&#8217;s address across the entire filesystem (using grep -R &#8220;sitedomain.com&#8221; / ) and came across a load of files in /tmp/magento.  After deleting the directory magento started working perfectly again, though it continued to store cache files in /tmp/magento rather than var/cache/ for some reason.</p>
]]></content:encoded>
			<wfw:commentRss>http://that-matt.com/2010/08/config-cache-problems-with-magento/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Can&#8217;t connect to remote mysql server with php/apache but can through php/cli</title>
		<link>http://that-matt.com/2010/07/cant-connect-to-remote-mysql-server-with-phpapache-but-can-through-phpcli/</link>
		<comments>http://that-matt.com/2010/07/cant-connect-to-remote-mysql-server-with-phpapache-but-can-through-phpcli/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 21:00:50 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Web Servers]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[selinux]]></category>

		<guid isPermaLink="false">http://that-matt.com/?p=144</guid>
		<description><![CDATA[Today at work we were migrating some sites to a new server infrastructure with the different services (i.e. php, mysql, mail) spread over different servers. One problem we ran into whilst setting this up was that php scripts running through &#8230; <a href="http://that-matt.com/2010/07/cant-connect-to-remote-mysql-server-with-phpapache-but-can-through-phpcli/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today at work we were migrating some sites to a new server infrastructure with the different services (i.e. php, mysql, mail) spread over different servers.</p>
<p>One problem we ran into whilst setting this up was that php scripts running through apache were having trouble connecting to the mysql server.</p>
<p>What was even stranger though, was the fact that this problem only appeared when the php script(s) were run through apache &#8211; running them through the command line / shell worked absolutely fine.</p>
<p><span id="more-144"></span></p>
<p>After a couple of hours of debugging, head bashing and confusion we found the solution at the bottom of one of those very very long <a href="http://www.experts-exchange.com/Database/MySQL/Q_22606034.html">experts exchange</a> threads.</p>
<p>It turns out that some linux distros has a neat little access control system called SELinux which was blocking communication by apache to remote database servers.</p>
<p>The aforementioned exchange thread suggests disabling SELinux entirely by executing</p>
<pre class="brush:bash">sudo setenforce 0</pre>
<p>but this isn&#8217;t a permanent solution and won&#8217;t persist through a reboot <a href="http://googolflex.com/?p=482">without changing a config file</a>.</p>
<blockquote><p>This can be accomplished by changing a line in /etc/selinux/config. Change the line that says:<br />
<code>SELINUX=enforcing</code><br />
to<br />
<code>SELINUX=disabled</code></p></blockquote>
<p>However, if you&#8217;re willing to do a bit of digging there are <a href="http://www.beginlinux.com/server_training/web-server/976-apache-and-selinux">SEL options</a> you can change to <a href="http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6-Beta/html/Security-Enhanced_Linux/sect-Security-Enhanced_Linux-Booleans-Configuring_Booleans.html">grant apache access to remote database servers</a>, and if you have a few hours to kill, there&#8217;s also <a href="http://docs.fedoraproject.org/en-US/Fedora/13/html/SELinux_FAQ/index.html">the fedora documentation</a>.</p>
<p>Hopefully this&#8217;ll save someone else the headache we had!</p>
]]></content:encoded>
			<wfw:commentRss>http://that-matt.com/2010/07/cant-connect-to-remote-mysql-server-with-phpapache-but-can-through-phpcli/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

