<?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>bloody error &#187; Apache</title>
	<atom:link href="http://www.bloodyerror.com/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bloodyerror.com</link>
	<description>hope something here may help you...</description>
	<lastBuildDate>Thu, 14 Jan 2010 17:29:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Plesk 9.2.1 FastCGI Apache Error</title>
		<link>http://www.bloodyerror.com/2009/07/plesk-9-2-1-fastcgi-apache-error/</link>
		<comments>http://www.bloodyerror.com/2009/07/plesk-9-2-1-fastcgi-apache-error/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 09:18:45 +0000</pubDate>
		<dc:creator>Jeevan</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[administrator]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP FastCgi]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.bloodyerror.com/?p=17</guid>
		<description><![CDATA[First of All This solution is for Linux based OS. I did it on centOS 4 x64 Running Plesk 9.2.1.
Well, If you every come across the FastCGI issue with Plesk Apache and looking for a solution, I&#8217;m sure following could help you a lot.
Problem occurs when you set-up a Domain to Run PHP in FastCGI [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">First of All This solution is for Linux based OS. I did it on centOS 4 x64 Running Plesk 9.2.1.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Well, If you every come across the FastCGI issue with Plesk Apache and looking for a solution, I&#8217;m sure following could help you a lot.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Problem occurs when you set-up a Domain to Run PHP in FastCGI Application mode in Plesk and Apache won&#8217;t restart / start.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Reason for that is the Apache configuration file referring to Dynamic CGI Library that it&#8217;s actual.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Solution is to change Apache Config and point to correct Library Location. But If you directly edit Apache config file, On next restart Plesk will overwrite it. So Edit Plesk Config file to reflect on Apache Config file.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">First you need to Locate FastCGI. Location may vary based on Linux distributions your using.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">A Simple explanation is given on how to locate in : http://forum.parallels.com/showpost.php?p=372722&amp;postcount=18</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">They also telling you to Run &#8220;psa-php5-configurator-1.5.1-cos5.build92090422.13.noarch.rpm&#8221; to resolve this issue. Well, I couldn&#8217;t fin this RPM in my server. so resolved to directly editing method.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Once you find your FastCGI location (in my case it was /usr/bin/php-cgi) edit Plesk Config File located at &#8220;/etc/psa/psa.conf&#8221; (this may vary as well).</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">I used VI edit through SSH.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">vi /etc/psa/psa.conf</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Find the Following Line (I found it at very bottom!):</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">CGI_PHP_BIN dynamic</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">and Replace it with:</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">CGI_PHP_BIN /usr/bin/php-cgi</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Save the File and Exit VI edit</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">VI Editor Basic Commands: http://www.cs.colostate.edu/helpdocs/vi.html</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Now, Run this command to patch changes and restart Apache Server <img src='http://www.bloodyerror.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">/usr/local/psa/admin/sbin/websrvmng -av</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">It worked for me well! Let me know what happen to you&#8230; You can always use the source: http://forum.parallels.com/showthread.php?t=89939&amp;page=2 for more info and full reading.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">My server at 1&amp;1, Value for Price and Affordable Servers. have a look at : http://www.1and1.co.uk/?k_id=21520608</div>
<blockquote><p>* First of All This solution is for Linux based OS. I did it on <span style="color: #800000;">centOS 4 x64</span> Running <span style="color: #800000;">Plesk 9.2.1</span>.</p></blockquote>
<p>Well, If you every come across the FastCGI issue with Plesk Apache and looking for a solution, I&#8217;m sure following could help you a lot.</p>
<p><strong>Problem </strong>/<strong> Solution:</strong></p>
<ul>
<li>Problem occurs when you set-up a Domain to Run PHP in FastCGI Application mode in Plesk and Apache won&#8217;t restart / start.</li>
<li>Reason for that is the Apache configuration file referring to Dynamic CGI Library that it&#8217;s actual.</li>
<li>Solution is to change Apache Config and point to correct Library Location. But If you directly edit Apache config file, On next restart Plesk will overwrite it. So Edit Plesk Config file to reflect on Apache Config file.</li>
</ul>
<h3>1. Find FastCGI Path</h3>
<p>First you need to Locate FastCGI. Location may vary based on Linux distributions your using. A Simple explanation is given on how to locate in : <a href="http://forum.parallels.com/showpost.php?p=372722&amp;postcount=18" target="_blank">Simple Instruction on Where to look for FastCGI</a></p>
<p><em><span style="color: #888888;">They also telling you to Run &#8220;psa-php5-configurator-1.5.1-cos5.build92090422.13.noarch.rpm&#8221; to resolve this issue. Well, I couldn&#8217;t fin this RPM in my server. so resolved to directly editing method.</span></em></p>
<h3>2. Edit Plesk config</h3>
<p>Once you find your FastCGI location (in my case it was /usr/bin/php-cgi) edit Plesk Config File located at &#8220;<span style="color: #ff0000;">/etc/psa/psa.conf</span>&#8221; <em>(this may vary as well).</em></p>
<p>I used <span style="color: #0000ff;">VI</span> edit through <span style="color: #0000ff;">SSH</span>.</p>
<blockquote><p><span style="color: #0000ff;">vi</span> <span style="color: #ff0000;">/etc/psa/psa.conf</span></p></blockquote>
<p>Find the Following Line (I found it at very bottom!):</p>
<blockquote><p>CGI_PHP_BIN <span style="color: #ff0000;">dynamic</span></p></blockquote>
<p>and Replace it with:</p>
<blockquote><p>CGI_PHP_BIN <span style="color: #ff0000;">/usr/bin/php-cgi</span></p></blockquote>
<p>Save the File and Exit VI edit</p>
<p><em>VI Editor Basic Commands: <a href="http://www.cs.colostate.edu/helpdocs/vi.html" target="_blank">http://www.cs.colostate.edu/helpdocs/vi.html</a></em></p>
<h3>3. patch Changes to Apache Config</h3>
<p>Now, Run this command to patch changes and restart Apache Server <img src='http://www.bloodyerror.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<blockquote><p>/usr/local/psa/admin/sbin/websrvmng -av</p></blockquote>
<p><em>It worked for me well! Let me know what happen to you&#8230; You can always use the source: </em><a href="http://forum.parallels.com/showthread.php?t=89939&amp;page=2 " target="_blank"><em>http://forum.parallels.com/showthread.php?t=89939&amp;page=2 </em></a><em>for more info and full reading.</em></p>
<p>My server at 1&amp;1, Value for Price and Affordable Servers. have a look at : <a href="http://www.1and1.co.uk/?k_id=21520608" target="_blank">http://www.1and1.co.uk</a></p>
<p><span id="more-17"></span></p>
<h3>How its happens:</h3>
<p>After Hosting my site(s) with so many Web-hosting companies (Most of those cheap once) and Living in fear when and what will happen, I decided to Buy a VPS (Virtual Private Server) or a Dedicated Server. Good VPS cost you $$$ p/a. Cheap once cost you around $100-150 or $200. But they will give you same headache as Cheap Shared Hosting. 1 and 1 UK offering cheap dedicated server deals. It&#8217;s not much of a Server Spec but it sure can handle several websites and they give you TRUE root access and your OWN server to manage. Price also looking good compare to a Good VPS and credible hosting company.</p>
<p>1 and 1 offered Free Plesk 9.0.1 Control Panel with this Dedicated Server as a Standard control panel. I just finished checking firewall settings and even set-up 1 and 1 Free External Cisco Firewall and transfered all my sites to My New Server&#8230;</p>
<p>All working wonderfully. Then I logged into my Blog and started to write an Article and Upload a Image (I use Wordpress!). Image upload returned error that it does not have writing permission for the uploads directory. It usually happens when you move around and you forgot to set the correct permission (CHMOD). Through FTP I Changed permission to uploads folder and tried again. Nope, same error. Again logged into FTP and verified writing permission to uploads folder. It does have necessary permission and it also created a folder where image should be uploaded (Wordpress uses uploads<span style="color: #339966;">/YYYY/MM</span> structure to upload media contents). when I checked the permission for the root folder (YYYY), It does shows that it has writing permission but it&#8217;s owner shows as apache.</p>
<p>This is where I realized that default Apache mod_php is running that it uses apache user to writing / edit files. This will cause trouble when having multiple domains and users on a server. I also know that running PHP using FastCGI would resolve this issue and I remember seeing FastCGI option to run PHP in Plesk.</p>
<p>Logged into my Plesk Control Panel and Changed my Domain Settings to Run PHP as FastCGI Application and restarted Apache through Plesk Service Management. Apache started to give error and did not start. Now I went crazy and started to google what the hell is wrong with FastCGI and Plesk!</p>
<p>It seems they have this issue in earlier version as well due to wrong configuration and bug too. Many forums offered many different solutions, most common one is to Run Plesk php configurator rpm and and this would resolve the issue. Well, I don&#8217;t really want to make a mess with my server and If anything goes wrong, only thing I know is to re-image. Re-imaging server will result in loosing all my data and configurations so far!&#8230;</p>
<p>Finally, on Paralles forums I found a simpler solution. Forum Topic link and Solution In this article to make your life easier.</p>
<p><a href="http://1and1.co.uk/xml/init/?k_id=21520608" target="_blank"><img src="http://banner.1and1.co.uk/xml/banner?size=2&amp;number=3" border="0" alt="" width="468" height="60" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloodyerror.com/2009/07/plesk-9-2-1-fastcgi-apache-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple .htaccess Redirect guide</title>
		<link>http://www.bloodyerror.com/2009/06/simple-htaccess-redirect-guide/</link>
		<comments>http://www.bloodyerror.com/2009/06/simple-htaccess-redirect-guide/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 18:05:36 +0000</pubDate>
		<dc:creator>Jeevan</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[moving domain]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.bloodyerror.com/?p=15</guid>
		<description><![CDATA[It won&#8217;t take longer to find a simple .htaccess redirect in google. Many has written many different types of redirect, some are confusing and some are others&#8230; It took me hours to figure out what and how to setup a simple redirect. There is a comprehensive guide provided by Apache for .htaccess , I Suggest [...]]]></description>
			<content:encoded><![CDATA[<p>It won&#8217;t take longer to find a simple .htaccess redirect in google. Many has written many different types of redirect, some are confusing and some are others&#8230; It took me hours to figure out what and how to setup a simple redirect. There is a comprehensive guide provided by <a href="http://httpd.apache.org/docs/1.3/howto/htaccess.html" target="_blank">Apache for .htaccess </a>, I Suggest you read this for more information on how to use .htaccess in your webhosting account.</p>
<h3>Know what HTTP status to give</h3>
<p>Before we begun, You should be aware of what type of HTTP code to give when redirecting pages on server side.</p>
<ul>
<li><strong>301</strong> = Page is Permanently Moved to new location</li>
<li><strong>302</strong> = Page found, But temporarily moved to new location (This is useful when you want to redirect users while doing some updates or maintaining site).</li>
</ul>
<h3>Move a Single Page</h3>
<pre class="brush: plain;">Redirect 301 /oldpage.html http://www.example.com/newpage.html</pre>
<p>This simple code will Redirect oldpage.html to given url on the right</p>
<h3>Move Entire Site</h3>
<pre class="brush: plain;">Redirect 301 / http://www.newsite.com/</pre>
<p>This code is useful when you want to move an Entire site to a new domain. All request will be redirect to new url for example If a user request <span style="color: #339966;">http://www.oldsite.com/folder/page.html</span> this code will redirect that user to <span style="color: #ff6600;">http://www.newsite.com/</span><span style="color: #339966;">folder/page.html</span> . As you can see that all requests will be send to new url as well.</p>
<h3>Rename File Extension</h3>
<pre class="brush: plain;">RedirectMatch 301 (.*)\.html$ http://www.example.com$1.php</pre>
<p>This will simply change all .html requests into .php on anywhere on the site.</p>
<h3>Redirect a Folder to another Folder or site</h3>
<pre class="brush: plain;">RedirectMatch 301 /folder$ http://www.example.com</pre>
<p>This will redirect <span style="color: #008000;">http://www.oldsite.com/folder</span> to <span style="color: #ff6600;">http://www.example.com</span>. If you want the request followed by folder to be send to new site, you need to add <span style="color: #008000;">$1</span> at the end of new URL (<span style="color: #008080;">RedirectMatch 301 /folder$ http://www.example.com/$1</span>).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloodyerror.com/2009/06/simple-htaccess-redirect-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
