lighttpd

lighttpd mod_rewrite all

Hi all, i need an regex to do the following: redirect EVERY request to the index.php if there are get parameters in the url i need to access them with $_GET[] (php) My (not complete) solution is: url.rewrite-once = ( ".*\?(.*)$" => "/index.php?$1&full_request=$0" ) But the error here is that if there's not an "?" in the url i g...

Questions regarding Lighttpd for Windows

I am using lighty for windows, yes i know it's not linux, but atm can only afford local hosting, which then allows me to do a lot of learning and practicing my web skills. I am aware that fast-cgi, does not work on windows, but I am wondering what other ways, to improve performance are there? Also I was wondering how to hide all those ...

modify file content

I'm installing a lighttpd server on a remote machine using a bash script. After installation, I need to configure the port for the server. The system says I don't have permission to modify the file /etc/lighttpd/lighttpd.conf even though I do sudo echo "server.bind=2000" >> /etc/lighttpd/lighttpd.conf How shall I modify this? ...

How do I gzip my html source

I would like to gzip the html sources of my webpages, what's the best way to do it on a lighttpd/php5 server. I have tried to do it by editing my php.ini file with: zlib.output_compression = On zlib.output_handler = On but it seems to be a transparent compression only. ...

What does 'sockets disabled, connection limit reached' mean?

I am running lighttpd-1.4 on Redhat4 and I got this error when lighttpd crashed: 2009-11-13 16:28:41: (server.c.1383) [note] sockets disabled, connection limit reached 2009-11-13 16:28:53: (server.c.1337) [note] sockets enabled again What does this mean and how can I avoid it? I have googled it and did not come up with anything usef...

Configuring Lighttpd, PHP5 and MySQL5 for a no-supervision installation...

I'm creating a script that'll work on a Lighttpd, PHP5 and MySql5. The point is, it must be full-offline script installed and configured with all the requirements by one installer. It's a bit modified wiki thing. How to do a such thing? ...

Mono / Lighttpd - Garbage text added to SVG file returned via Response.Write()

I am developing a web application that manages a population of plants. One feature of the application is the ability to view relationships between plants as a graph. This visualisation is generated as a dot file, then turned into SVG using GraphViz. The resulting SVG markup is then rendered to the browser via an .aspx file, using the Res...

How do you do custom flags and values in lighttpd for PHP?

Perhaps this has already been asked, but I'm brand new to lighttpd and I'd like to know how to configure it more thoroughly. In Apache, you can set PHP flags and values as a part of your configuration: php_flag error_reporting OFf php_value error_log /path/to/log/file.log Is there a way to do the same with lighttpd? For bonus points,...

Rewriting with lighttpd - how to remove file extensions

I would like to use lighttpd's mod_rewrite to allow requests without a specific file extension. For instance, I would like the following mappings to automatically work: Requesting for "/index" would serve "/index.php". "/dir/file" => "/dir/file.php" "/dir/file?args" => /dir/file.php?args" Can this be easily done with a single rewrite...

Lighttp and wordpress URL rewrite

I'm having a problem while rewriting the wp-login URL using Lighttpd I have the following rule "^/wp-login.php?([^\?]+)(\?(.*))?" => "/wp-login.php?$1" but it doesn't seem to work. when I load the signup page (http://domain.com/wp-login.php?action=register )it keeps ignoring the action=register querystring what's the correct rule ...

fastcgi, cherrypy, and python

So I'm trying to do more web development in python, and I've picked cherrypy, hosted by lighttpd w/ fastcgi. But my question is a very basic one: why do I need to restart lighttpd (or apache) every time I change my application code, or the code for an underlying library? I realize this question extends from a basic mis(i.e. poor)underst...

Some files won't stream from lighttpd to Droid

We are running into some odd issues with streaming certain files in our app. After lots and lots of testing we've narrowed it down to what seems like some sort of issue between lighttpd and Droid, and it's not just our app but the built in player as well. If you point the Droid browser to http://stream29l.grooveshark.com/collinSong.mp3 ...

Apache AllowOverride equivalent in Lighttpd

I've put a .htaccess file in my main directory of my lighttpd website like this: url.rewrite-once = ( "^/cat.php$" => "index.php" ) And I have enabled mod_rewrite and mod_redirect in my lighttpd.conf and restarted lighttpd server. But unfortunately when i type mydomain/cat.php i got error page 404. I've found that in Apache ther...

Redirect en.example.com to example.com/index.php?language=en

I would like redirect addresses that start with: en.example.com/somefile.php to: example.com/somefile.php?language=en Using mod_rewrite module in lighttpd. Until now I got this: $HTTP["host"] =~ "^en\.(.*)\.com$" { url.rewrite-once = ( "^/(.*)" => "/$1?language=en" ) ...

Adding subdomain support into lighttpd

I have a lighttpd server with website placed in /home/httpd/example.com/httpdocs and there I have a file called file.php. When I type http://en.example.com/file.php I would like to display file.php that is in default website directory (mentioned above). So I used document-root described here: http://redmine.lighttpd.net/wiki/1/Server.d...

haskell fastCGI on lighttpd, need help with configuration

I'm trying to setup a lighttpd server that will run fastCGI programs written in haskell. So far i got this haskell program: import Network.CGI import Text.XHtml page :: Html page = body << h1 << "Hello World!" cgiMain :: CGI CGIResult cgiMain = output $ renderHtml page main :: IO () main = runCGI $ handleErrors cgiMain and this li...

Django and PHP together with lighttpd?

I'm playing around with Django and have built my personal homepage in Django, but I want to use my wordpress blog as a path. For example if I want to path /blog/ in Django or in lighttpd so it will render the PHP wordpress site what is the best way to do that? I tested with proxy.server in lighttpd with no luck - it seems like Django ...

Redirect .cn .jp .ch .eu .fr to domain.com on lighttpd

Hi Everyone I would like to redirect several domains to our dotcom address. The domains have the following extensions: cn jp ch eu fr www.domain.fr should point to www.domain.com - sub.domain.fr should point to sub.domain.com and the path after the extension should stay intact so that www.domain.fr/foo points to www.domain.com/foo ...

Lighttpd/FastCGI treating routes as static content

I've come across a frustrating issue with FastCGI and Rails whereby lighttpd is treating routed url's as static files (i.e. not sending them to rails since it believes they're static) If I hit the root path I get the rails application, but as soon as I hit something with a URL structure, even a path that matches the default :controller/...

Lighttpd + fastCGI, decide to show or not to show image (without XSendfile)

Hello, I've faced a difficultiest problem. Let's imagine that all images are stored on image storage running lighttpd web server. All images URLs like http://domain.com/image_id.jpg. Before displaying this image I want to check if this image was protected or not. So, we should do something like this... a) Request to webserver b) Getti...