Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It's been years since I last had anything to do with web servers. The last time, I found that Apache along with FastCGI (actually mod_fcgid) and suEXEC gave me a seemingly perfect way to handle PHP; each script would run with the privileges of its owner thanks to suEXEC, and FastCGI would make it so that PHP didn't need to spawn every time a request came in. Absolutely marvellous!

Now I'm setting up a little VPS just for fun. Due to memory constraints (and the desire to learn something new), Apache has been replaced by lighttpd. Moreover, the last time around I swore never to touch PHP again. So this time, I'll use Python (and possibly Haskell) for my dynamic needs. I've played around a bit with lighttpd+FastCGI+Python, but I can't see how I should tie this in with something equivalent to suEXEC.

So, to the question: Could someone give me some pointers as to how I would go about setting up lighttpd with FastCGI in such a way that every Python script requested is run (through FastCGI) with the privileges of the user owning said script?

share|improve this question

In Apache you can define patterns (similar to mod_cgi) which designate requests sent to FastCGI applications. Mod_fcgid is a FastCGI process manager, spawning each unique application with a specific permissions (suexec).

This is not possible with lighttpd. Lighttpd does not have a FastCGI process manager, which can change permissions, built-in (which is what mod_fcgid does).

The closest you will get with lighttpd is spawn-fcgi, which coincidentally comes from the lighttpd project. Take a look at the lighttpd ModFastCGI wiki under External Spawning.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .