jereme claussen

Concrete5, Pretty URL's and DreamHost

dreamhost-logo.png

** UPDATE ** An updated version of this process has been posted here.

DreamHost has been my hosting company of choice for a good few years now.  What's not to love about these guys? Awesome pricing, employee owned, carbon neutral and the best damned panel out there.  Their service can be rocky from time to time, but in the end they always come through and I wind up completely happy again.  They also do free registered non-profit hosting which I think  is great.

One thing I've found is that getting Concrete5 to work on DreamHost with Pretty URL's seems to be somewhat of a moving target.  In the past I've offered guides via the Concrete5 forums on how to accomplish this.  Once again confronted with re-figuring out the process, I thought I'd post about my most recent successful experience.


Upon installing Concrete5 5.3.3.1 on DreamHost and enabling Pretty URL's, you'll likely be confronted with a "No input file specified" error when navigating anywhere beyond the home page.

For security reasons, DreamHost chooses to run PHP scripts as a CGI.  When mixed with mod_rewrite, the desired URL is not properly passed on to php5.cgi resulting in a full breakdown when Concrete5 attempts to decipher which page is requested.

The solution is, oddly enough, to run PHP through a rapper with a completely non-modified copy of their own php.ini.

First make a cgi-bin directory within your site's root directory:

mkdir cgi-bin
chmod 755 cgi-bin

Now copy DreamHost's php.ini file into this directory:

cd cgi-bin
cp /etc/php5/cgi/php.ini .
chmod 644 php.ini

Next we must create the PHP wrapper itself in the cgi-bin directory:

touch php-wrapper.fcgi
chmod 744 php-wrapper.fcgi

Use your favorite editor to put the following contents in php-wrapper.fcgi:

#!/bin/sh
export PHP_FCGI_CHILDREN=2
exec /dh/cgi-system/php5.cgi $*

Lastly, the contents of your .htaccess file should look something like:

Options +ExecCGI

AddHandler php5-cgi .php

Action php5-fastcgi /cgi-bin/php-wrapper.fcgi


RewriteEngine On
RewriteCond %{REQUEST_URI} !^/cgi-bin/.*

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php/$1 [L]

Most notably are the first 3 directives which enable the wrapper, and the RewriteCond directive immediately following RewriteEngine On that instructs mod_rewrite to ignore requests against the cgi-bin.

Ensure that nobody but the owner can write to your .htaccess file (or it won't work) and then you'll be golden!

I can't promise that this will work on every DreamHost server.  They are all in various stages of PHP and Apache versions.  This particular server was running PHP 5.2.9.





Please add a comment

Posted by Chi Zeng on
Thank you, Jeremy. Many c5 developers have been looking everywhere for a solution on Dreamhost for Concrete5 pretty URLS. It seems to work effectively.
Posted by Bryan on
Was trying to follow along so that I could enable fastCGI. when I modified the .htacess file it broke the site, giving me an internal server error.

back to regular.
Leave a Reply



(Your email will not be publicly displayed.)

Please type the letters and numbers shown in the image.Captcha Code



Order Accutane no Prescription Buy Tablets Clomid Take Lasix Cheap Buying Baclofen no Prescription Purchase no Prescription Strattera Take Prednisone Without Prescription Cheapest Tetracycline Pills Take Doxycycline Cheap Purchase Propranolol cod Purchase Online Without Prescription Nolvadex Buy Metformin pills Purchase generic Furosemide Buy Acomplia pills Take Bactrim Pills Purchase Fluoxetine meds Without Prescription Purchase Antabuse generic Take Hydrochlorothiazide Next Day delivery Buying Without Prescription Erythromycin Pills Purchase Lithium Carbonate Purchase Abilify meds Without Prescription Cheapest Order Cymbalta Purchase Online Without Prescription Clavamox Take Cipro Pills Purchase Cytotec Without a Prescription Buying Levaquin no Prescription Buy Tablets Revia When to Take Ventolin Generic Order Benicar When to Take Aricept Purchase Clonidine Without a Prescription Purchase Stromectol free delivery Purchase generic Rimonabant Buy alternative Diflucan Pills Buying Proscar Buy Without a Prescription Ampicillin Order Seroquel Next Day Delivery Purchase no Prescription Alli Buying Inderal legally Purchase Elavil no Prescription Buy Yasmin medication Purchase no Prescription Proventil Order Maxalt Medication Take no Prescription Actonel Buy generic Accutane Take Clomid Without Prescription Purchase Cheap Lasix Buying Baclofen legally Order Cheap Strattera Buying Prednisone legally Buy Tetracycline Overnight delivery Buy Doxycycline from Canada Buy Cheap Propranolol Order no Prescription Nolvadex Purchase Cheap Metformin Take Furosemide Without Prescription Purchase Acomplia alternative Order Bactrim no Prescription Purchase Fluoxetine no Prescription Buying Antabuse Purchase Hydrochlorothiazide generic Purchase Erythromycin alternative When to Take Lithium Carbonate Buying Abilify on line Buy no Prescription Cymbalta Buy Tablets Clavamox Online Buy Cipro no Prescription Buying Cytotec legally Buying Levaquin no Prescription Order no Prescription Revia Order Ventolin Medication Order Benicar Next Day Delivery Order Online Without a Prescription Aricept Buying Clonidine Take Stromectol Pills Buy Without a Prescription Rimonabant Purchase Cheap Diflucan Buy no Prescription Proscar Generic Order Ampicillin Online Buying Seroquel Buying Alli no Prescription Take Inderal Pills Purchase Elavil alternative Buy no Prescription Yasmin Alternative Buying Proventil Generic Order Maxalt Purchase Actonel Without a Prescription Take no Prescription Accutane Buy Clomid cod Buy Lasix from Canada Buy Cheapest Baclofen Pills Purchase Strattera Generic Order Prednisone Buy Tetracycline Tablets Buying Pills Doxycycline Buy Cheap Propranolol Buying Nolvadex Purchase Metformin free delivery Purchase Cheap Furosemide Buy Tablets Acomplia Online Online Buy Bactrim Without a Prescription Purchase Fluoxetine meds Without Prescription Buy Without a Prescription Antabuse Buy generic Hydrochlorothiazide Buy no Prescription Erythromycin Purchase Cheap Lithium Carbonate Buy Tablets Abilify Online Order Cymbalta Next Day Delivery When to Take Clavamox Online Order Cipro Without Prescription Buy Cheapest Cytotec Order Levaquin Pills Buy Without a Prescription Revia Buy Tablets Ventolin Online Generic Order Benicar Buying Without Prescription Aricept Take Clonidine Next Day delivery Buy Stromectol Tablets Buy Rimonabant next day delivery Buying Without Prescription Diflucan Purchase Proscar free delivery Cheapest Ampicillin Pills Purchase Seroquel no Prescription Buy Pills Alli Online Purchase Inderal generic Online Buy Elavil Without a Prescription Purchase no Prescription Yasmin Purchase Cheap Proventil Purchase no Prescription Maxalt Order Online Without a Prescription Actonel purchasing Accutane Pharmacy Without Prescription Buying Pills Clomid Purchase Cheap Lasix Purchase Baclofen meds Without Prescription Buy Strattera no Prescription Buy Cheap Prednisone Buy Tetracycline Online Purchase Doxycycline alternative Buying Propranolol no Prescription Tablets Buy Nolvadex Buy Without a Prescription Metformin Buy Furosemide cod Buy Acomplia next day delivery Buy Cheapest Bactrim Purchase generic Fluoxetine Buy Pills Antabuse Online Buy Tablets Hydrochlorothiazide Online Buy Erythromycin Overnight delivery Generic Order Lithium Carbonate Buying Abilify Pharmacy Without Prescription Buy Cheap Cymbalta Purchase Clavamox generic Cheapest Order Cipro Buy Cytotec Overnight delivery Buy no Prescription Levaquin