i’ve installed lighthhtpd server to execute php and python files… but when i run a .py file it popups a download windows to that file.
Here is what i’ve put in the cgi conf file
cgi.assign = (".py" => "/usr/bin/python2.6",
".php" => "/usr/bin/php-cgi" )
Anyone knows how to fix this in order to have python files working on lighthttpd?
Thanks.
Try putting your .py files inside a
cgi-bindirectory, and running them from there. If I remember correctly by default the lighttpd configuration only allows cgi scripts incgi-bindirectories. Please post your entirecgi.confif possible.If it works, find the snippet that looks like
$HTTP["url"] =~ "^/cgi-bin" { (...) }and remove the surrounding match block.When you download the file right now, what’s inside? Is it the actual source of the Python script there, or the expected output of the execution in text? I’m guessing it’s the earlier, if not please clarify.