<?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>Kabisa Blog &#187; Hosting</title>
	<atom:link href="http://blog.kabisa.nl/category/hosting/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kabisa.nl</link>
	<description>The Ruby on Rails Experts</description>
	<lastBuildDate>Thu, 17 Jun 2010 11:13:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setup a self-signed SSL site with Apache2</title>
		<link>http://blog.kabisa.nl/2010/03/08/setup-a-self-signed-ssl-site-with-apache2/</link>
		<comments>http://blog.kabisa.nl/2010/03/08/setup-a-self-signed-ssl-site-with-apache2/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 15:23:48 +0000</pubDate>
		<dc:creator>Ariejan de Vroom</dc:creator>
				<category><![CDATA[Hosting]]></category>

		<guid isPermaLink="false">http://blog.kabisa.nl/2010/03/08/setup-a-self-signed-ssl-site-with-apache2/</guid>
		<description><![CDATA[Some things need to be secure. Login and registration pages are often among them. This guide will show you how to quickly set-up a SSL site with a self-signed certificate and automatic HTTP-to-HTTPS redirect. This is ideal for setting up staging environments.
I&#8217;ll assume you have a standard Debian system with the apache2 package installed and [...]]]></description>
			<content:encoded><![CDATA[<p>Some things need to be secure. Login and registration pages are often among them. This guide will show you how to quickly set-up a SSL site with a self-signed certificate and automatic HTTP-to-HTTPS redirect. This is ideal for setting up staging environments.</p>
<p>I&#8217;ll assume you have a standard Debian system with the apache2 package installed and ready.</p>
<p>The first step is to generate a key. You must choose a passphrase here. We&#8217;ll remove that later on for easier Apache2 restarts</p>
<pre>openssl genrsa -des3 -out server.key 4096</pre>
<p>Next, you need to generate a <em>Certificate Sign Request</em> or CSR. Some things to consider:</p>
<ul>
<li>Enter the <em>Fully Qualified Domain Name</em> in the <em>Common Name</em> field. For this blog that&#8217;d be &#8216;blog.kabisa.nl&#8217;.</li>
<li>There&#8217;s no need to set a <em>challenge password</em>.</li>
</ul>
<pre>openssl req -new -key server.key -out server.csr</pre>
<p>Next, sign the request with your key.</p>
<pre>openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt</pre>
<p>Then, create an insecure version of your key. This will remove the pass phrase. If you don&#8217;t do this apache will ask for the pass phrase when it loads the key.</p>
<pre>openssl rsa -in server.key -out server.key.insecure
mv server.key server.key.secure
mv server.key.insecure server.key</pre>
<p>A good place to keep your key and certificate is <code>/etc/apache2/ssl</code>. Make sure you chmod 600 it for the root user.</p>
<p>Okay, setup your VirtualHosts. This example is for a Passenger-powered example app.</p>
<pre>&lt;VirtualHost *:80&gt;
  ServerName example.com

  Redirect permanent / https://example.com/
&lt;/VirtualHost&gt;

&lt;VirtualHost *:443&gt;
  ServerAdmin support@example.com
  ServerName example.com

  # SSL Engine Switch
  SSLEngine on

  # SSL Cipher Suite:
  SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

  # Server Certificate
  SSLCertificateFile /etc/apache2/ssl/server.crt

  # Server Private Key
  SSLCertificateKeyFile /etc/apache2/ssl/server.key

  # Set header to indentify https requests for Mongrel
  RequestHeader set X-Forwarded-Proto "https"

  BrowserMatch ".*MSIE.*" \
  nokeepalive ssl-unclean-shutdown \
  downgrade-1.0 force-response-1.0

  DocumentRoot /var/rails/example/current/public
  &lt;Directory "/var/rails/example/current/public"&gt;
    AllowOverride all
    Allow from all
    Options -MultiViews
  &lt;/Directory&gt;
 &lt;/VirtualHost&gt;</pre>
<p>There is a file name <code>/etc/apache2/ports.conf</code> that configures which ports apache listen on. Make it look like this:</p>
<pre>NameVirtualHost *:80
Listen 80

&lt;IfModule mod_ssl.c&gt;
    NameVirtualHost *:443
    Listen 443
&lt;/IfModule&gt;</pre>
<p>All set. Now restart apache2 and you should be good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kabisa.nl/2010/03/08/setup-a-self-signed-ssl-site-with-apache2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xen: How to fix &#8220;SIOCSIFADDR: No such device&#8221;</title>
		<link>http://blog.kabisa.nl/2009/12/11/xen-how-to-fix-siocsifaddr-no-such-device/</link>
		<comments>http://blog.kabisa.nl/2009/12/11/xen-how-to-fix-siocsifaddr-no-such-device/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 08:54:38 +0000</pubDate>
		<dc:creator>Ariejan de Vroom</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[eth0]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://blog.kabisa.nl/?p=47</guid>
		<description><![CDATA[Yesterday I had to clone a VPS to run some CPU and memory intensive tests. With our current setup (Xen + LVM), cloning an image on the fly is easy. 
After configuring a new IP address for the clone, I booted up the system. Nice, but I ran into a problem:
Configuring network interfaces...SIOCSIFADDR: No such [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I had to clone a VPS to run some CPU and memory intensive tests. With our current setup (Xen + LVM), cloning an image on the fly is easy. </p>
<p>After configuring a new IP address for the clone, I booted up the system. Nice, but I ran into a problem:</p>
<pre>Configuring network interfaces...SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
SIOCSIFBRDADDR: No such device
eth0: ERROR while getting interface flags: No such device
eth0: ERROR while getting interface flags: No such device
Failed to bring up eth0.</pre>
<p>After some investigation I found that the MAC address for eth0 is stored on disk in <code>/etc/udev/rules.d/z25_persistent-net.rules</code>. That makes sense, because the whole file system was cloned. But, I swapped the virtual network card, and I&#8217;d expect is to work. It didn&#8217;t. </p>
<p>The solution is quite easy. Empty <code>/etc/udev/rules.d/z25_persistent-net.rules</code>. Then shutdown and start your VPS. You must do a full shutdown, a reboot won&#8217;t work. </p>
<p>For the lazy folk out there, here&#8217;s how to quickly empty the file:</p>
<pre>echo "" > /etc/udev/rules.d/z25_persistent-net.rules</pre>
<p>After you have started your VPS back up again, you should be able to ping out over the network. If you peek in <code>/etc/udev/rules.d/z25_persistent-net.rules</code> you should see a line that contains the MAC address for your virtual network device.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kabisa.nl/2009/12/11/xen-how-to-fix-siocsifaddr-no-such-device/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
