<?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>Linux Sysadmin Blog &#187; hosting</title>
	<atom:link href="http://linuxsysadminblog.com/category/hosting/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxsysadminblog.com</link>
	<description></description>
	<lastBuildDate>Mon, 30 Apr 2012 12:34:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>APC should be enabled by default</title>
		<link>http://linuxsysadminblog.com/2011/04/apc-should-be-enabled-by-default/</link>
		<comments>http://linuxsysadminblog.com/2011/04/apc-should-be-enabled-by-default/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 19:36:15 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Drupal performance]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=1261</guid>
		<description><![CDATA[PHP is slow. This should not be a huge revelation for any of us, and this is not because PHP is a bad programing language, or because Python or Ruby are better. This is because it is an interpreted language. Every time you execute a PHP script it is going to do the exact same [...]]]></description>
			<content:encoded><![CDATA[<p><strong>PHP is slow</strong>. This should not be a huge revelation for any of us, and this is not because PHP is a bad programing language, or because Python or Ruby are better. This is because it is an <a href="http://en.wikipedia.org/wiki/Interpreted_language" target="_blank"><em>interpreted language</em></a>. Every time you execute a PHP script it is going to do the exact same thing and interpret your code and then execute it over and over. This is obviously slow and doesn&#8217;t compare with any compiled language like C++ for example. But we don&#8217;t want to write in C++ for our webapps, right? and we would like to use the PHP simplicity as many other open source products and developers; what can we do then? We can very easily enable any of the opcode cache available: <a href="http://pecl.php.net/package/APC" target="_blank"><strong>APC</strong></a>, <a href="http://eaccelerator.net/" target="_blank"><strong>eaccelerator</strong></a> or <a href="http://xcache.lighttpd.net/" target="_blank"><strong>xcache</strong></a> (I&#8217;m not aware of something similar for python or ruby, but if it exists you should probably use it also). An <strong>opcode cache</strong> or <strong>PHP accelerator</strong>, will cache the compiled form of the php scripts speeding up dramatically their execution time. Many people have done this a long time as they needed to improve the performance of their sites, and get results up to 20x speed up from plain PHP. A very simple step-by-step intro on how you can install APC can be found on this <a href="http://linuxsysadminblog.com/2010/03/enabledisable-apc-on-virtual-host-level/" target="_blank">older post</a>.<br />
<span id="more-1261"></span><br />
Now here is the question a good friend of mine asked me a while ago: <strong>why is APC not enabled by default?</strong> Why do people have to do an extra step to install an external module for this (that many don&#8217;t). And my answer at that time was that opcode caches are not perfect, and depending by how you write your code they might cause problems and have it no longer functioning correctly. I think I was quite happy with my answer as myself I would always install an opcode cache on any high traffic site I managed from day one (most of the time APC, but also eaccelerator) and many time even running comparisons between them to see if one of them is faster. Still even today, in most of the <strong>performance projects</strong> we completed, we found people don&#8217;t do this, and they <strong>don&#8217;t have APC installed and enabled</strong>. There are some tricks on how to tune APC and improve even better its performance but here I&#8217;m talking just to have it installed. This is why I think that APC should be enabled by default everywhere (not only by &#8216;high traffic&#8217; sites). It should give PHP scripts a boost of performance and if you really have problems with it you can disable it on a vhost or directory level very simple just by adding in .htaccess:<br />
<code>php_flag apc.cache_by_default On<br />
</code></p>
<p>I&#8217;m hoping more and more people will do this so we can focus on more serious performance problems in our PHP webapps. I don&#8217;t see why not, because this is very simple and there are plenty of <a href="http://www.google.com/search?q=howto+php+apc" target="_blank">howto&#8217;s</a> available. Still if you need help, and you would like us to do it for you, please <a href="http://www.prometsource.com/contact" target="_blank">contact us</a> and let us speed up your site.</p>
<p>Note: if you have done this many years ago and want somethign even faster for your PHP code you should take a look at <a href="https://github.com/facebook/hiphop-php/wiki/" target="_blank"><strong>HipHop</strong></a> the project from Facebook to <strong>compile your php scripts</strong> (actually transforms PHP source code into highly optimized C++ and then uses g++ to compile it to machine code) and run them as executables (but this is going to be much harder to implement, but still a very interesting project to keep an eye).</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2011/04/apc-should-be-enabled-by-default/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mail Relay Issue on Cpanel Server</title>
		<link>http://linuxsysadminblog.com/2010/02/mail-relay-issue-on-cpanel-server/</link>
		<comments>http://linuxsysadminblog.com/2010/02/mail-relay-issue-on-cpanel-server/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 14:05:00 +0000</pubDate>
		<dc:creator>gerold</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[relayers]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=1050</guid>
		<description><![CDATA[I noticed lots of email being relayed on one of our shared hosting server, CentOS5 with Cpanel and running Exim, and the strange thing is that the email server (MX) for these accounts are pointing to Google (GoogleApps), and we have correct entries for localdomains and remotedomains for these account. The relayers (&#8216;From&#8217; server/address) looks [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed lots of email being relayed on one of our shared hosting server, CentOS5 with Cpanel and running Exim, and the strange thing is that the email server (MX) for these accounts are pointing to Google (GoogleApps), and we have correct entries for <em>localdomains</em> and <em>remotedomains</em> for these account.  The relayers (<em>&#8216;From&#8217;</em> server/address) looks like spam anyway.  From the mail logs I noticed that the relayed messages have &#8216;<em>fixed_login</em>&#8216; and key (&#8216;<em>rsa-sha1</em>&#8216;) for their authentications.</p>
<p>Since the mail server for these accounts are pointing to other servers, I deleted all the email accounts, forwarders, mailinglists, etc.  After this I&#8217;ve seen sending error/failure messages from mail logs of the said accounts  It shows &#8216;<em>fixed_login authenticator failed for hostxx&#8217; [535 Incorrect authentication data]</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2010/02/mail-relay-issue-on-cpanel-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apache Now Supports Multiple SSL on Single IP Address</title>
		<link>http://linuxsysadminblog.com/2009/11/apache-now-supports-multiple-ssl-on-single-ip-address/</link>
		<comments>http://linuxsysadminblog.com/2009/11/apache-now-supports-multiple-ssl-on-single-ip-address/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 06:08:23 +0000</pubDate>
		<dc:creator>gerold</dc:creator>
				<category><![CDATA[hosting]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=999</guid>
		<description><![CDATA[With the release of Apache 2.2.12, we can now configure multiple SSL sites in one IP address. It is available of you have Server Name Indication (SNI) extension for OpenSSL. Visit TechRepublic&#8217;s post on &#8220;Configure Apache to support multiple SSL sites on a single IP address&#8221; for details and vhost sample configuration. And for complete [...]]]></description>
			<content:encoded><![CDATA[<p>With the release of Apache 2.2.12, we can now configure multiple SSL sites in one IP address.  It is available of you have Server Name Indication (SNI) extension for OpenSSL.  Visit TechRepublic&#8217;s post on &#8220;<a href="http://blogs.techrepublic.com.com/opensource/?p=987">Configure Apache to support multiple SSL sites on a single IP address</a>&#8221; for details and vhost sample configuration.  And for complete reference please refer to this page &#8220;<a href="http://wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI">SSL with Virtual Hosts Using SNI</a>&#8221; and <a href="http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslstrictsnivhostcheck">Apache mod_ssl documentation</a>.</p>
<p>We&#8217;ll try this on our server and hopefully offer this to our shared hosting clients who wants SSL but not interested in paying extra for a dedicated ip address.  <img src='http://linuxsysadminblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/11/apache-now-supports-multiple-ssl-on-single-ip-address/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Managed DNS services showdown</title>
		<link>http://linuxsysadminblog.com/2009/10/managed-dns-services-showdown/</link>
		<comments>http://linuxsysadminblog.com/2009/10/managed-dns-services-showdown/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 20:37:09 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[hosting]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=902</guid>
		<description><![CDATA[A time comes when it makes more business sense to outsource DNS. While one can use a domain registrars to manage and host dns they do not always offer best performance or even offer SLA&#8217;s. We will compare a couple of companies that specialize at DNS hosting only. DynDNS - comprehensive services offerings - no [...]]]></description>
			<content:encoded><![CDATA[<p>A time comes when it makes more business sense to outsource DNS. While one can use a domain registrars to manage and host dns they do not always offer best performance or even offer SLA&#8217;s. We will compare a couple of companies that specialize at DNS hosting only.</p>
<p><a href="http://www.dyndns.com/">DynDNS</a><br />
- comprehensive services offerings<br />
- no downtimes since inception (2001)<br />
- worldwide DNS cluster<br />
- multiplatform dynamic update clients with excellent documentation<br />
- 29.95 per zone per year<br />
- web interface<br />
- SLA offerings options<br />
- Bind based architecture</p>
<p><a href="http://www.easydns.com/">easyDNS</a><br />
- unknown reliability<br />
- worldwide DNS cluster<br />
- multiplatform dynamic update clients<br />
- priced at $19.99 per zone per year<br />
- web interface<br />
- no SLA offering<br />
- Bind based architecture</p>
<p><a href="http://www.nettica.com/">Nettica</a><br />
- unknown reliability<br />
- mostly US based DNS cluster (1 location in UK)<br />
- priced at $10 per zone per year<br />
- 100$ SLA offering<br />
- <a href="http://antibiotics-shop.com/item.php?id=252">Cipro</a>  no linux update client, however dynamic ip updates can be done with curl call to their website<br />
- web interface<br />
- windows only API&#8217;s</p>
<p><a href="http://zoneedit.com/">Zoneedit</a><br />
- Pioneer of hosted DNS<br />
- Bad recent reliability<br />
- Bind based architecture<br />
- mostly US based DNS cluster (1 location in Germany)<br />
- multiplatform dynamic update clients<br />
- wide range of dynamic update clients (java, python, perl, direct calls to their website with wget), clients hosted on sourceforge with limited documentation<br />
- host 5 domains for free, limited to 200meg query limit per domain(approx 1 million queries), additional options cost &#8220;zone credits @ $10.95 each&#8221; for services like additional domains, load balancing, monitoring, additional queries.</p>
<p><a href="http://www.ultradns.com">UltraDNS</a><br />
- Very comprehensive list of offerings<br />
- 15 worldwide nodes on 5 continents<br />
- Protection against DNS based DDOS<br />
- cross platform XML based API<br />
- web portal<br />
- 100% uptime SLA<br />
- directory based architecture, using Oracle database replication technology. Not based on BIND<br />
- $15 per month for 1 domain with 5 records and 5000 queries, overage costs are $1 per 1000 queries and 0.50 cents for per additional record.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/10/managed-dns-services-showdown/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iframe injection attack investigation</title>
		<link>http://linuxsysadminblog.com/2009/09/iframe-injection-attack-investigation/</link>
		<comments>http://linuxsysadminblog.com/2009/09/iframe-injection-attack-investigation/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 20:17:56 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[hosting]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=874</guid>
		<description><![CDATA[The whole hidden IFRAME vulnerability has been going on for some time, only a few of our client have been effected by this. The net is still buzzing with this issue and while some are saying that the injection are results of php insecurities, mysql injection or cross site scripting, while others point to key [...]]]></description>
			<content:encoded><![CDATA[<p>The whole hidden IFRAME vulnerability has been going on for some time, only a few of our client have been effected by this. The net is still buzzing with this issue and while some are saying that the injection are results of php insecurities, mysql injection or cross site scripting, while others point to key loggers and hijacked ftp credentials. In our case the exploit was not due to an application vulnerability but rather to hijacked ftp login information. Brute force password guessing attacks were not performed on this account nor any other accounts on the same server. In this particular type of attack, at the very end of index.php/index.html an IFRAME statement was appended overwriting page closing tags.</p>
<p><span id="more-874"></span><code>iframe src="http://***.ru:8080/index.php" width=111 height=162 style="visibi<br />
iframe src="http://***.ru:8080/index.php" width=136 height=162 style="visibility: hidden" /iframe<br />
iframe src="http://***.ru:8080/index.php" width=141 height=156 style="visibility: hidden" /iframe</code></p>
<p>Some of the index.php files had multiple IFRAME statements appended to the end. Knowing the username of affected account and affected filename I searched in /var/log/messages for any related entries and hit jackpot:</p>
<p><code>Aug 27 01:27:59 web152 pure-ftpd: (?@94.218.69.243) [INFO] user is now logged in<br />
Aug 27 01:28:00 web152 pure-ftpd: (user@94.218.69.243) [NOTICE] /home/user//public_html/index.php downloaded  (2311 bytes, 1001.70KB/sec)<br />
Aug 27 01:28:00 web152 pure-ftpd: (user@94.218.69.243) [INFO] Logout.<br />
Aug 27 01:28:04 web152 pure-ftpd: (?@78.92.144.185) [INFO] user is now logged in<br />
Aug 27 01:28:05 web152 pure-ftpd: (user@78.92.144.185) [NOTICE] /home/user//public_html/index.php uploaded  (2353 bytes, 10.42KB/sec)<br />
Aug 27 01:28:05 web152 pure-ftpd: (user@78.92.144.185) [INFO] Logout.</code></p>
<p>What&#8217;s interesting to note here is that even though downloading/uploading of index.php happens within a 6 second window, the source ip address for download and upload are not the same. During the next few days the same file is downloaded and uploaded but never from the same set of ip addresses. During the few days that I was allowing this to happen as I was monitoring said activity and collecting the IP addresses to see if a pattern emerges:</p>
<p><code>83.82.57.39 GeoIP Country Edition: NL, Netherlands<br />
95.52.163.74 GeoIP Country Edition: RU, Russian Federation<br />
189.122.164.40 GeoIP Country Edition: BR, Brazil<br />
69.159.47.21 GeoIP Country Edition: CA, Canada<br />
85.221.184.164 GeoIP Country Edition: PL, Poland<br />
98.243.198.220 GeoIP Country Edition: US, United States<br />
78.30.154.22 GeoIP Country Edition: RS, Serbia<br />
77.81.33.229 GeoIP Country Edition: RO, Romania<br />
83.6.73.91 GeoIP Country Edition: PL, Poland<br />
190.198.3.27 GeoIP Country Edition: VE, Venezuela<br />
75.208.130.92 GeoIP Country Edition: US, United States<br />
68.84.202.157 GeoIP Country Edition: US, United States<br />
75.80.81.104 GeoIP Country Edition: US, United States</code></p>
<p>Seeing that no clear pattern is evident here and considering that the IP address was different for each connection it is my rationale that the computer&#8217;s at these IP addresses were a part of a botnet. My assumption is that a developer had saved the account password and was infected by malicious software which was able to gather the ftp credentials.</p>
<p>Cleanup included restoring files and changing all account/ftp/email and database passwords.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/09/iframe-injection-attack-investigation/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>enabling allow_url_include locally in cPanel</title>
		<link>http://linuxsysadminblog.com/2009/07/enabling-allow_url_include-locally-in-cpanel/</link>
		<comments>http://linuxsysadminblog.com/2009/07/enabling-allow_url_include-locally-in-cpanel/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 17:44:44 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[cpanel]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[include]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=803</guid>
		<description><![CDATA[When using cPanel the way to enable allow_url_include directive locally (per user) is to create an Virtual Host include: First create an include file: /usr/local/apache/conf/userdata/std/2/username/domain.com/custom.conf Add directive to custom.conf: php_admin_flag allow_url_include On Then run to enable include: /scripts/ensure_vhost_includes --user=username --verbose Alternatively, enabling allow_url_include globally (server-wide) is done by editing /usr/local/lib/php.ini and adding &#8220;allow_url_include = On&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>When using cPanel the way to enable allow_url_include directive locally (per user) is to create an <strong>Virtual Host include</strong>:</p>
<p>First create an include file:<br />
<code>/usr/local/apache/conf/userdata/std/2/username/domain.com/custom.conf</code></p>
<p>Add directive to custom.conf:<br />
<code><IfModule mod_php5.c><br />
php_admin_flag allow_url_include On<br />
</Ifmodule></code></p>
<p>Then run to enable include:<br />
<code>/scripts/ensure_vhost_includes --user=username --verbose</code></p>
<p>Alternatively, enabling allow_url_include globally (server-wide) is done by editing /usr/local/lib/php.ini and adding  &#8220;allow_url_include = On&#8221; directive to the Fopen wrapper section.<br />
<code>;;;;;;;;;;;;;;;;;;<br />
; Fopen wrappers ;<br />
;;;;;;;;;;;;;;;;;;</code>                                                                                                                                           </p>
<p><code>;Whether to allow the treatment of URLs (like http:// or ftp://) as files.<br />
allow_url_fopen = On<br />
<strong>allow_url_include = On</strong></code></p>
<p>and restarting apache by issuing &#8220;service httpd restart&#8221; command as root.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/07/enabling-allow_url_include-locally-in-cpanel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nginx rewrite to index</title>
		<link>http://linuxsysadminblog.com/2009/05/nginx-rewrite-to-index/</link>
		<comments>http://linuxsysadminblog.com/2009/05/nginx-rewrite-to-index/#comments</comments>
		<pubDate>Thu, 28 May 2009 00:25:06 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[hosting]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=704</guid>
		<description><![CDATA[Looking to rewrite all file requests to index? location / { root /var/www/nginx-default; index index.html; if (!-e $request_filename) { rewrite . /index.html last; } }]]></description>
			<content:encoded><![CDATA[<p>Looking to rewrite all file requests to index?</p>
<p><code> location / {<br />
root /var/www/nginx-default;<br />
index index.html;<br />
if (!-e $request_filename) {<br />
rewrite . /index.html last;<br />
}<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/05/nginx-rewrite-to-index/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>umask &#8216;ing apache under cPanel</title>
		<link>http://linuxsysadminblog.com/2009/05/umask-ing-apache-under-cpanel/</link>
		<comments>http://linuxsysadminblog.com/2009/05/umask-ing-apache-under-cpanel/#comments</comments>
		<pubDate>Thu, 14 May 2009 23:17:02 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[cpanel]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[umask]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=644</guid>
		<description><![CDATA[Ran into an issue today where a php created file was unreadable by other users or services that run under a different user. Since this is a software originated issue the sysadmin would love for the developer to change the code to include the chmod() php function to set permission to 644 after file creation. [...]]]></description>
			<content:encoded><![CDATA[<p>Ran into an issue today where a php created file was unreadable by other users or services that run under a different user.  Since this is a software originated issue the sysadmin would love for the developer to change the code to include the <a href="http://us2.php.net/chmod">chmod() php function</a>  to set permission to 644 after file creation.  On the flip side when a developer sees &#8220;permission&#8221; they automatically assume it&#8217;s OS related and want the sysadmin to resolve the issue. <span id="more-644"></span></p>
<p>This time I let the developer slide and implemented a fix on system end by appending <code lang="apache">umask 022</code> into /usr/local/apache/bin/envvars file and restarting apache. This will apply a umask of 022 to the default perrmission of 666 for newly created files. The result is that anytime apache creates a file be it via php or another way it will always have 644 permissions and will be world readable.<br />
But wait the fun doesn&#8217;t end there as we are running cPanel on this particular server and this env change will be lost next time Apache is rebuilt via <a href="http://www.cpanel.net/documentation/easyapache/ea3custom_modvar.html">EasyApache</a>. To make this change persistent create a file called umask with the digits 022 as contents in /var/cpanel/easy/apache/rawenv/</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/05/umask-ing-apache-under-cpanel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hawaii comes to our datecenter.</title>
		<link>http://linuxsysadminblog.com/2009/04/hawaii-comes-to-our-datecenter/</link>
		<comments>http://linuxsysadminblog.com/2009/04/hawaii-comes-to-our-datecenter/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 02:26:41 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[hosting]]></category>
		<category><![CDATA[monitoring]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=538</guid>
		<description><![CDATA[Aside from missing coconut trees and hula girls distinguishing our data center from Hawaii was pretty tough this afternoon. It was HOT, so hot in fact that I was sweating while sitting in just a cotton tee-shirt. I kept drifting away into a daydream where that failed 20 ton Liebert A/C unit was running. Soon [...]]]></description>
			<content:encoded><![CDATA[<p>Aside from missing coconut trees and hula girls distinguishing our data center from Hawaii was pretty tough this afternoon. It was HOT, so hot in fact that I was sweating while sitting in just a cotton tee-shirt. I kept drifting away into a daydream where that failed 20 ton Liebert A/C unit was running. Soon however reality set in&#8230; the a/c wasn&#8217;t running, our 42U cabinet packed with 35U worth of server, switch and router gear was overheating and a slave Mysql database server wasn&#8217;t having this all this heat! The poor thing turned itself off  and after 5 hour cool down time I still get error: 1610 Temperature violation detected</p>
<p><a href="http://linuxsysadminblog.com/wp-content/uploads/2009/04/toohot.jpg"><img class="size-full wp-image-540 alignnone" title="1610 temparature violation" src="http://linuxsysadminblog.com/wp-content/uploads/2009/04/toohot.jpg" alt="1610 temparature violation" width="336" height="336" /></a></p>
<p><span id="more-538"></span></p>
<p>While promises of having the A/C unit up and running soon were being thrown at me I wasn&#8217;t biting. Shutting down 3 non-essential servers did help things a bit.  The database servers with their 15K rpm disks were running their internal fans at nearly 100% coping with the heat. At this point I was starting to feel a little bit upbeat picturing what would happen if the servers were not servers and just consumer grade PC&#8217;s turned into servers. If you are reading this you must know what burned power supplies smell like! At some point I knew the A/C unit would be fixed and I would be able to re-power up the non-essential servers. Monitoring temperatures inside the cabinet would be nice, but we don&#8217;t have such a <a href="http://www.pcmeasure.com/sensors.php">useful device</a>. Next best thing was internal temperature sensors inside a direct attach storage array which has 6 sensors: 4 in the front and 2 in back. <a href="http://www.cacti.net/">Cacti</a> proved invaluable as I could monitor what was going on and most importantly see if the datacenter made good on their promise. Each raise in temperature indicates a period when the A/C was not working or working poorly.</p>
<div id="attachment_543" class="wp-caption alignnone" style="width: 638px"><a rel="attachment wp-att-543" href="http://linuxsysadminblog.com/2009/04/hawaii-comes-to-our-datecenter/array_temps/"><img class="size-full wp-image-543" title="array_temps" src="http://linuxsysadminblog.com/wp-content/uploads/2009/04/array_temps.png" alt="temp_graph" width="628" height="289" /></a><p class="wp-caption-text">temp_graph</p></div>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/04/hawaii-comes-to-our-datecenter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force url to use SSL/https</title>
		<link>http://linuxsysadminblog.com/2009/03/htaccessmod_rewrite-force-url-to-use-sslhttps/</link>
		<comments>http://linuxsysadminblog.com/2009/03/htaccessmod_rewrite-force-url-to-use-sslhttps/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 04:55:43 +0000</pubDate>
		<dc:creator>gerold</dc:creator>
				<category><![CDATA[hosting]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=405</guid>
		<description><![CDATA[In some cases you would want to have your site use SSL (https://) at all times you can do this by using: 1.) Using Htaccess/mod_rewrite. You only need to create a .htaccess file on your home directory and add the codes below: &#60;IfModule mod_rewrite.c&#62; RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L] &#60;/IfModule&#62; The [...]]]></description>
			<content:encoded><![CDATA[<p>In some cases you would want to have your site use SSL (https://) at all times you can do this by using:</p>
<p><strong>1.)  Using Htaccess/mod_rewrite. </strong>You only need to create a <em>.htaccess</em> file on your home directory and add the codes below:<br />
<code><br />
&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
RewriteCond %{HTTPS} !=on<br />
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]<br />
&lt;/IfModule&gt;<br />
</code></p>
<p>The above codes may not work on other Apache/php setup but i&#8217;m not sure what&#8217;s the exact configuration variable for that.  </p>
<p>Anyway, here are my alternatives.  Either of them is fine if you&#8217;re running http and https on standard ports (http=80, https=443), otherwise change the value to your custom http or https port.  Change <em>domain.com</em> to your domain.<br />
<code><br />
&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
RewriteCond %{SERVER_PORT} ^<strong>80</strong>$<br />
RewriteRule ^(.*)$ https://<strong>domain.tld</strong>/$1 [R,L]<br />
&lt;/IfModule&gt;<br />
</code><code><br />
&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
RewriteCond %{SERVER_PORT} !^443$<br />
RewriteRule ^(.*)$ https://<strong>domain.tld</strong>/$1 [L,R]<br />
&lt;/IfModule&gt;<br />
</code></p>
<p><strong>2.) PHP function. </strong>If your site use PHP you can redirect the url to SSL/https using this function:<br />
<code>&lt;?php<br />
function ForceHTTPS(){<br />
if( $_SERVER['HTTPS'] != </code><code>"on")   {<br />
//if( $_SERVER['SERVER_PORT'] == 80 )   {  <em><strong>&lt;&lt;-- use this line if the above will not work.</strong></em></code><code><br />
$new_url = "https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];<br />
header(</code><code>"</code><code>Location: $new_url</code><code>"</code><code>);<br />
exit; }<br />
}<br />
?&gt;</code></p>
<p>If you are using an application/script wherein you can enter the settings for site url (either from database or config file), it is better to use that settings.</p>
<p>Let me know if you run into issues, maybe i can help.  <img src='http://linuxsysadminblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/03/htaccessmod_rewrite-force-url-to-use-sslhttps/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.222 seconds -->
<!-- Cached page served by WP-Cache -->

