<?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>AnyHosting &#187; ubuntu</title>
	<atom:link href="http://anyhosting.com/blog/category/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://anyhosting.com/blog</link>
	<description>It&#039;s all about the web</description>
	<lastBuildDate>Sat, 10 Apr 2010 03:35:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>limiting I/O and CPU on Linux with nice and ionice</title>
		<link>http://anyhosting.com/blog/2010/03/18/limiting-io-and-cpu-on-linux-with-nice-and-ionice/</link>
		<comments>http://anyhosting.com/blog/2010/03/18/limiting-io-and-cpu-on-linux-with-nice-and-ionice/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 21:03:47 +0000</pubDate>
		<dc:creator>rhelmer</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[web hosting]]></category>

		<guid isPermaLink="false">http://anyhosting.com/blog/?p=119</guid>
		<description><![CDATA[In one of my earlier posts about web hosting with Ubuntu Server, I left the startup script for the user-owned Apache instances as an exercise for the reader; the gist of it is to create a script in /etc/init.d/ (based on the &#8220;skeleton&#8221; file in that directory). The meat of it is something like: for [...]]]></description>
			<content:encoded><![CDATA[<p>In one of my <a href="http://anyhosting.com/blog/2009/10/03/secure-shared-web-hosting-on-ubuntu-server-part-2/">earlier posts</a> about web hosting with Ubuntu Server, I left the startup script for the user-owned Apache instances as an exercise for the reader; the gist of it is to create a script in /etc/init.d/ (based on the &#8220;skeleton&#8221; file in that directory). The meat of it is something like:</p>
<div class="codecolorer-container bash default" 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: #000000; font-weight: bold;">for</span> d <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/*</span><br />
<span style="color: #000000; font-weight: bold;">do</span><br />
&nbsp; apache2 <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$d</span><span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>apache2.conf <span style="color: #660033;">-k</span> start<br />
<span style="color: #000000; font-weight: bold;">done</span></div></div>
<p>This iterates over the directories in /var/www and runs Apache for each one, each with it&#8217;s own config file.</p>
<p>One interesting thing you can do here is make the user&#8217;s Apache process &#8220;nice&#8221; to fellow processes:</p>
<div class="codecolorer-container bash default" 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: #000000; font-weight: bold;">for</span> d <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/*</span><br />
<span style="color: #000000; font-weight: bold;">do</span><br />
&nbsp; <span style="color: #c20cb9; font-weight: bold;">nice</span> <span style="color: #660033;">-10</span> ionice <span style="color: #660033;">-c3</span> apache2 <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$d</span><span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>apache2.conf <span style="color: #660033;">-k</span> start<br />
<span style="color: #000000; font-weight: bold;">done</span></div></div>
<p>&#8220;<a href="http://en.wikipedia.org/wiki/Nice_%28Unix%29">nice</a>&#8221; changes priority for tasks waiting on CPU, while &#8220;<a href="http://linux.die.net/man/1/ionice">ionice</a>&#8221; changes the priority for tasks waiting on IO (for example disk reads and writes).</p>
<p>This can keep one busy or misbehaving server from interrupting other sites or important background tasks; alternatively, you could set one site to be highest-priority.</p>
]]></content:encoded>
			<wfw:commentRss>http://anyhosting.com/blog/2010/03/18/limiting-io-and-cpu-on-linux-with-nice-and-ionice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web hosting with ubuntu server</title>
		<link>http://anyhosting.com/blog/2008/01/14/web-hosting-with-ubuntu-server/</link>
		<comments>http://anyhosting.com/blog/2008/01/14/web-hosting-with-ubuntu-server/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 06:53:27 +0000</pubDate>
		<dc:creator>rhelmer</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[web hosting]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://anyhosting.com/blog/?p=21</guid>
		<description><![CDATA[I&#8217;m thinking about doing series of how-to style articles on more technical subjects, here are some thoughts on a starting point: how to install and use Ubuntu Server, with AnyHosting as a case study. AnyHosting currently uses Ubuntu Server (LTS) on a Rimuhosting.com virtual host. Ubuntu is very easy to install and use as a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m thinking about doing series of how-to style articles on more technical subjects, here are some thoughts on a starting point: how to install and use Ubuntu Server, with AnyHosting as a case study.</p>
<p>AnyHosting currently uses <a href="http://www.ubuntu.com/products/whatisubuntu/serveredition">Ubuntu Server</a> (LTS) on a <a href="http://rimuhosting.com/">Rimuhosting.com</a> virtual host. Ubuntu is very easy to install and use as a desktop, but if you haven&#8217;t done administration purely from the command line then Server can be a bit daunting. There are excellent <a href="http://doc.ubuntu.com/ubuntu/serverguide/C/">starter guides</a> and <a href="http://www.ubuntu.com/support/community/webforums">forums</a> on the Ubuntu website.</p>
<p><strong>Services</strong></p>
<p>The following external services are provided (description followed by Ubuntu package name) :</p>
<ul>
<li>web server &#8211; apache2</li>
<li>SMTP(+SSL) email server &#8211; postfix</li>
<li>IMAP/POP(+SSL) email server &#8211; courier</li>
<li>FTP &#8211; proftpd</li>
</ul>
<p>Additionally, there are some internal services running, which are not visible from the internet (blocked by the &#8220;iptables&#8221; firewall):</p>
<ul>
<li>Database &#8211; mysql</li>
<li>Monitoring/auto-recovery service &#8211; monit</li>
<li>Automatic installation of security updates &#8211; cron-apt</li>
<li>Log monitoring and reporting &#8211; <strike>logwatch</strike> logcheck</li>
<li>Append-only network backups &#8211; rsync</li>
</ul>
<p><strong>Security</strong></p>
<p>All unused ports are blocked. Any connection attempts are logged and reported. FTP and email services authenticate against the database, so clients do not need system or shell accounts.</p>
<p>For shared hosting, Apache is configured to proxy to chrooted installs which users have access to (as discussed <a href="http://anyhosting.com/blog/?p=11">previously</a>). This is <a href="http://www.bpfh.net/simes/computing/chroot-break.html">not as secure</a> as having a real separate VM or better yet a separate machine for each web hosting client, but therein lies the dilemma of low-cost shared hosting versus moderate-to-high priced dedicated hosting.</p>
<p>The primary goal is to protect legitimate users from eachother; protecting the system from unauthorized intrusion (and detecting such intrustion) probably deserves it&#8217;s own series of articles, however the last few services listed in the &#8220;Services&#8221; section above should give some clues.</p>
<p><strong>UPDATE link to <a href="http://anyhosting.com/blog/2009/10/01/secure-shared-web-hosting-on-ubuntu-server-part-1/">secure shared hosting on ubuntu server part 1</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://anyhosting.com/blog/2008/01/14/web-hosting-with-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

