Sapid
Sapid

Reputation: 35

Python + PHP + Lighttpd?

I've set up a few web servers in my day, but I'm not sure how they work internally. I'm setting up a new environment for myself and I'm interested in configuring my lighttpd server to support both PHP and Python. Is this possible?

Upvotes: 3

Views: 3084

Answers (2)

sybreon
sybreon

Reputation: 3156

You can also enable Lighty to use .pl, .py and .php as 'cgi' by enabling mod_cgi and setting it up. The default configs are on the Lighty website. However, this will have the benefits and problems of running an independent cgi process. If you are only experiencing light traffic, performance shouldn't be an issue.

Upvotes: 1

Peter Smit
Peter Smit

Reputation: 28736

Yes, this is possible. Here you can find a sample configuration.

fastcgi.server = (
".php" => ((
"bin-path" => "/usr/bin/php5-cgi",
"socket" => "/tmp/php.socket"
)),
"django.fcgi" => (
"main" => (
"host" => "127.0.0.1",
"port" => 9090, #set the port numbers to what-eva you want
),
),
"admin.fcgi" => (
"admin" => (
"host" => "127.0.0.1",
"port" => 9091,
)
)
)

Upvotes: 3

Related Questions