-
Notifications
You must be signed in to change notification settings - Fork 345
Lighttpd configuration
ochristi edited this page Mar 22, 2013
·
14 revisions
url.rewrite-once += ( "^/selfoss/favicon.ico$" => "/selfoss/public/favicon.ico", "^/selfoss/favicons/(.*)$" => "/selfoss/data/favicons/$1", "^/selfoss/thumbnails/(.*)$" => "/selfoss/data/thumbnails/$1", "^/selfoss/(.*.(js|ico|gif|jpg|png|css|asc|txt|eot|woff|ttf|svg))$" => "/selfoss/public/$1", "^/selfoss/index.php(.*)$" => "$0", "^/selfoss/([^\?]*)(\?(.*))?" => "/selfoss/index.php?$3", "^/selfoss/public/" => "$0", "^/selfoss/(.*)" => "/selfoss/index.php$1" )
This is in the case that you have selfoss installed in a subdirectory named selfoss, like http://yourdomain/selfoss/
If you have installed selfoss at the root folder of your web server, then you just need to remove selfoss references from the rules above.
Note (alternative setup): probably a more terse and a bit more secure (restrictive) setup is
url.rewrite-once = ( "^/selfoss/favicon.ico$" => "/selfoss/public/favicon.ico", "^/selfoss/favicons/(.*)$" => "/selfoss/data/favicons/$1", "^/selfoss/thumbnails/(.*)$" => "/selfoss/data/thumbnails/$1", "^/selfoss/(.*\.(js|ico|gif|jpg|png|css|asc|txt|eot|woff|ttf|svg))$" => "/selfoss/public/$1", #"^/selfoss/(.*?)(\?.+)?" => "/selfoss/index.php/$1$2", "^/selfoss/(.*)" => "/selfoss/index.php$1" )
It is possible to set up automatic compression for the javascript as
server.modules += ( "mod_compress" ) compress.cache-dir = "/var/www/cache/compress/" compress.filetype = ("text/plain", "text/html", "text/javascript")
The compression of the feed pages themselves can be arranged by php by adding
zlib.output_compression = On
to php.ini (check, where is it on your system), or by
php_flag zlib.output_compression On
in .htaccess file, which is still consulted by php even though it is running under lighttpd