Configure Drupal on LigHTTPD
Since I use Drupal quite a bit for this website I thought it would be a good idea to setup a test environment for myself so that I can tinker with themes and explore the system some more. Unfortunately Drupal's community documentation is terrible because the support forums get off-topic frequently and the search mechanism they have a wretched search system.
These 2 sets of instructions have been particularly helpful in setting up the environment.
- Install Drupal to Ubuntu
- Then Configure LigHTTPD fastcgi for Drupal
- Remember to (1) restart your Lighttpd server OR (2) run from the command line to get errors and warnings.
1. sudo /etc/init.d/lighttpd restart
2. sudo lighttpd -D -f /etc/lighttpd/lighttpd.conf
If you try to run it before step 2 you will get an error because FastCGI isn't configured yet.
strict warning: var: Deprecated. Please use the public/private/protected modifiers in /usr/share/drupal/themes/engines/xtemplate/xtemplate.inc on line 42.
Long story short, this chunk of LigHTTPD config that I use that let's me get to drupal on http://localhost/drupal.
var.drupal="/var/www/drupal"
$HTTP["url"]=~"^/drupal" {
#rails-stuff
fastcgi.server = (".php" =>
("localhost" =>
(
"min-procs" => 1,
"max-procs" => 2,
"socket" => "/tmp/drupal.socket",
"bin-path" => "/usr/bin/php4-cgi"
)))
}
login to post comments
use php5-cgi instead
I don't know what the difference between php4-cgi or php5-cgi are but using php4-cgi gave me this error.
2006-12-01 21:26:04: (mod_fastcgi.c.1014) the fastcgi-backend /usr/bin/php4-cgi failed to start:
2006-12-01 21:26:04: (mod_fastcgi.c.1029) terminated by signal: 11
2006-12-01 21:26:04: (mod_fastcgi.c.1034) to be exact: it seg-fault, crashed, died, ... you get the idea.
2006-12-01 21:26:04: (mod_fastcgi.c.1036) If this is PHP try to remove the byte-code caches for now and try again.
2006-12-01 21:26:04: (mod_fastcgi.c.1322) [ERROR]: spawning fcgi failed.
2006-12-01 21:26:04: (server.c.832) Configuration of plugins failed. Going down.
by switching over to the bin-path to php5-cgi, fastcgi runs.
var.drupal="/usr/share/drupal"
$HTTP["url"] =~ "^/drupal" {
fastcgi.server = (".php" =>
("localhost" => (
"min-procs" => 1,
"max-procs" => 2,
"socket" => "/tmp/drupal.socket",
"bin-path" => "/usr/bin/php4-cgi",
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
)
)))
}
login to post comments
Nuts!
My ISP crashed and consequently went out of business. I have moved my blog. For new articles visit blog.infoentropy.com
tags in Articles
User login
Other blogs
Recent blog posts
- Step-by-step to build a facebook app with CakePHP
- Enabling CakePHP 1.1 on Lighttpd 1.5
- Install and configure PHP5 and lighttpd on mac os x 10.4
- lighttpd as a startup item on os x
- Mac tips for Unix users
- Moving your cursor in a terminal with bash shell (Mac OS X, and Ubuntu Linux compatible)
- linux user management commands
- Setup LigHTTPD virtual hosting by hand
- Reload your hosts file in Mac
- Using MochiKit doXHR
remember to add this line to php.ini
add this line to the php.ini in the paths and directories section, it fixes something.
for ubuntu, the file location depending on version is
/etc/php5/cgi/php.ini
/etc/php4/cgi/php.ini