Page 1 of 1

Running CMSMS with Pretty URL´s under lighttpd instead of apache

Posted: Tue Aug 26, 2008 9:11 pm
by viebig
Hi Folks, I just got my personal VPS

I´m running Debian Etch with kernel 2.6.18, Mysql 5.0.32, lighttpd 1.4.13 using mod_rewrite and mod_fastcgi using PHP 5.2.0

lighttpd rewrite mechanism is really different from apache, since it´s supposed to be light and quick eating less resources. There´s no .htaccess or such to make it work, so I had to add it manually to lighttpd config.

I assume that you have mod_rewrite and mod_fastcgi working! And your base dir is /cms

add this to you config:

Code: Select all

url.rewrite-once = (
   "^/cms/(.*)\.(.*)" => "$0",
   "/cms/(admin)/" => "$0",
   "^/cms/([^.]+)$" => "/cmsms/index.php?page=$1",
   "^/cms/$" => "cmsms/index.php"
)
Explanation:

First line act as: if not file
Second line act as: if not dir (but we do need to specify dirs)
The rest is the same!



works really great, and lighttpd is really fast! and eat less system resources

Re: Running CMSMS with Pretty URL´s under lighttpd instead of apache

Posted: Tue Aug 26, 2008 10:21 pm
by nuno
Hey viebig,

to small request from me :)

1- can you add this on wiki for new ppl?
2- can you add this on PT forum ;)  ?

Thanks

Nuno Costa

Re: Running CMSMS with Pretty URL´s under lighttpd instead of apache

Posted: Wed Aug 27, 2008 12:29 am
by viebig
consider it done