lighttpd

Lighttpd mod_rewrite to Apache Mod_rewrite

Hello, I am looking for some help here. I am trying to convert lighttpd mod_rewrite to apache mod_rewrite Here it is. Lighttpd url.rewrite-once = ( "/torrent/([0-9A-F]{2,2})([0-9A-F]{2,2})([0-9A-F]{36,36}).*" => "/t3/$1/$2/$3.torrent", ) I look up multiply tutorials of apache's mod_rewrite but really no help. Here what I came up...

Lighttpd + PHP + FCGI

Hello. I have a problem with Lighttpd, PHP and CGI. I use OpenSUSE.10. I have builded lighttpd (version 1.4.23) and php (version 5.3.0). This is lighttpd build command lines: ./configure --prefix=/home/gosh/Desktop/web_server/lighttpd_native_installed --without-zlib --enable-ssl --enable-openssl --with-openssl=/home/gosh/Desktop/we...

Fast CGI, Lighttpd, Ubuntu

Is this log file familiar to someone of UBUNTU users? Lighttpd log file: > 2009-08-30 21:37:45: (log.c.75) server started > 2009-08-30 21:37:45: (mod_fastcgi.c.1029) the fastcgi-backend php5-cgi *failed* to start: > 2009-08-30 21:37:45: (mod_fastcgi.c.1033) *child exited with status 9 php5-cgi* > 2009-08-30 21:37:45: (mod_fastcgi.c....

In bash, what is the simplest way to configure lighttpd to call a local python script based on a particular URL?

In bash, what is the simplest way to configure lighttpd to call a local python script while passing any query string or name-value pairs included with the URL as a command line option for the local python app to parse? Example: www.myapp.com/sendtopython/app1.py?Foo=Bar results in the following occurring on the system. >python app1.py...

Lighttpd, FastCGI, Django - how to restart automatically?

I am using Lighttpd + FastCGI + Django on a dev machine. I start FastCGI server via manage.py's command line option. Problem is that I do make changes to sources quite often and I need to get FastCGI to pick up those changes automatically, just as "./manage.py runserver" does. Is there a command-line option for that, perhaps, or any ot...

mod_rewrite problem with lighthttp

I am using mod_rewrite with lighttpd, and I am having an issue... Here is my rule: url.rewrite-once = (".*\.(js|ico|gif|jpg|png|css)$" => "$0", "" => "/index.php") The apache rule works on apache, and looks like this: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule !\.(js|ico|g...

Django dynamic content in VPS environment - when do I need a queue?

I've got some Django content that I plan to host on a vps, web facing. It dynamically generates images that are cached to disk (regeneration is not often needed except (1)user changes content within image or (2) the layout is updated globally so all images need regeneration) right now when a user requests a view, it checks to see if what...

Lighttpd url rewrite removes querystring variables

I am rewriting a URL in Lighttpd using url.rewrite-once = ( "^/(.*)\.(.+)$" => "$0", "^/(.+/?)\??$" => "/index.php?q=$1" ) So that all urls are passed to index.php as variable q. However when I visit http://mydomain.com/account/edit?user=5 my script at index.php gets q=account/edit?user=5 on apache I would get all variables i.e. ...

HTTP Basic Auth, reading password file and performance

hi, I'm curious to know what are the performance impacts of using HTTP Basic Auth on a webserver like Apache or lighttpd or nginx. I imagine the bottleneck is the actual reading of the file by the server to authenticate a user. It also seems to me that the cost of reading the file to authenticate a user is proportional to the number of ...

Better webserver performance for Python Django: Apache mod_wsgi or Lighttpd fastcgi

Hello, I am currently running a high-traffic python/django website using Apache and mod_wsgi. I'm hoping that there's a faster webserver configuration out there, and I've heard a fair number of recommendations for lighttpd and fastcgi. Is this setup faster than apache+mod_wsgi for serving dynamic django pages (I'm already convinced that...

Protect a directory in lighttpd using a php script

I would like to protect a directory and authenticate users against a mysql database. I am using lighttpd and haven't been able to find a way of doing so. Is it possible? ...

How can I assign a handler to handle ANY URLS?

I am doing a website with a REST architecture and I am finding the latter difficult to do. I want to be able to handle HTTP Requests like these : GET /myapp/5445/ HTTP/1.1 ... In an ideal world, I would code my own server and handle all the HTTP requests myself but I actually want to do this project with CGI or PHP and I want to be abl...

How to improve PHP performance more?

I've created PHP application for Facebook. It uses MySQL, Memcached and works on Lighttpd on Centos 2,6 Ghz and 2 GB RAM. it's basically one PHP file that after first run is cached and every next time it's served in 0,8 ms directly from Memcached. What more can I do to shorten this time? ...

socket: Too many open files (24) apache bench lighttpd

When I start Apache Bench test: ab -n 10000 -c 1300 http://domain.com/test.php I get error: socket: Too many open files (24) When i change to '-c 1000' it works fine. Because I can have more than 1000 concurrent users I would like to fix socket too many open files problem or increase parameter. How to do this and where? I u...

Failed requests by length in my ApacheBench load test result

I have a website in PHP, Lighttpd. It uses also MySQL on Centos 5. I've tested my PHP with code below with Apache Bench (ab). It resulted in some errors (Failed Requests) indicating other length than normal. I'm absolutely sure that my PHP result should always have the same exact length. I've reviewed my Lighttpd and MySQL logs and error...

flup/fastcgi cpu usage under no-load conditions

I'm running Django as threaded fastcgi via flup, served by lighttpd, communicating via sockets. What is the expected CPU usage for each fastcgi thread under no load? On startup, each thread runs at 3-4% cpu usage for a while, and then backs off to around .5% over the course of a couple of hours. It doesn't sink below this level. Is thi...

c alternative to signal() + alarm()

I'm building some FastCGI apps and it sort of bugs me that lighttpd doesn't kill them off after they've been idle, so I'm trying to have them close on their own. I tried using signal(SIGALRM, close); alarm(300); and having the close function execute exit(0), and that works almost well. The problem is the close function is being call...

Multipart Downloading in C#?

Please excuse my ignorance on the subject. I would like to write an application in C# that can download files off a server the same way DownThemAll does. DownThemAll seems to open four connections to the HTTP server to download the same file. I was just wondering if there are any existing libraries that might do this. Here is a quote f...

Secure communication between django server and iphone app

I'm writing an iPhone application that needs to send small bits of information (two strings of under 128 characters each, at a time, and this doesn't happen too frequently) to a server when users interact with it. I would like this information to remain confidential, so I'm thinking of some sort of encryption or secure connection would b...

How do I create a lighttpd proxy rule to redirect on differant ports based on url param

I currently have a proxy.server rule in lighttpd.conf that forwards all requests of routemsg.pl to port 1530: $HTTP["url"] =~ "/routemsg.pl" { proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => 1528) ) ) } How can I change the rule to allow the requester to pass a port param in the url and that param be then used as the po...