Friday, July 30, 2010
 

Mod rewrite rules for eZ Publish work with Lighttpd

Just ceople lines of code to make eZ Publish work with Lighttpd.

Lighttpd vhost rules looks like:

$HTTP["host"] =~ "(www\.<domain>\.lt|<domain>\.lt)" {
compress.cache-dir = "/var/cache/lighttpd/compress"
server.document-root = "/var/www/domains/<domain>"
server.errorlog = "/var/log/lighttpd/error.log"
accesslog.filename = "/var/log/lighttpd/access.log"
server.error-handler-404 = "/e404.php"
url.rewrite-once = (
"content/treemenu/.*" => "/index_treemenu.php/content/treemenu/$0",
"^/var/.*" => "$0",
"^/pixel\.gif.*" => "$0",
"^/.*flowplayer.swf.*" => "$0",
"^/.*\.(css|html|htm|pdf|js|ico|png|gif|jpe?g|swf)$" => "$0",
"^/.*?(\?.*)?$" => "/index.php$1"
)}

Also there may be need to edit override/site.ini.override.php to force nice url. Example:

[SiteAccessSettings]
CheckValidity=false
RemoveSiteAccessIfDefaultAccess=enabled
ForceVirtualHost=true
AvailableSiteAccessList[]
AvailableSiteAccessList[]=plain_site
AvailableSiteAccessList[]=site_admin
MatchOrder=uri
HostMatchMapItems[]

Tested with 4.2 eZ Publish version.

Back »

Comments: 0

Leave a reply »

 
  • Leave a Reply
    Your gravatar
    Your Name
     
     
     
     
     
 
About Remdex site

Simple site for simple peoples.

Get in touch

E-mail: remdex@gmail.com