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

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
viebig

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

Post 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
Last edited by viebig on Tue Aug 26, 2008 9:15 pm, edited 1 time in total.
nuno

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

Post 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
viebig

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

Post by viebig »

consider it done
Post Reply

Return to “Developers Discussion”