First, I should mention I'm pretty new to working with the pi, the os, lighttpd, fastcgi, etc. I've been following this: http://davstott.me.uk/index.php/2013/03/17/raspberry-pi-controlling-gpio-from-the-web/
I've been able to get it working, though my version is just getting some random numbers from python as opposed to turning on the gpio pins (just playing with the web to python part for now).
I do have two questions:
I notice all of my python goes to just running the same python script (doStuff.py), regardless of the actual called python script on the webserver: I upload /var/www/hello.py and go to it in the browser, but it runs doStuff.py instead.
This is probably due to the config from following the site (the bin-path line):
fastcgi.server = ( ".py" => ( "python-fcgi" => ( "socket" => "/tmp/fastcgi.python.socket", "bin-path" => "/var/www/doStuff.py", "check-local" => "disable", "max-procs" => 1) ) )
How would I change this so that it does actually run any desired python scripts as opposed to being 'locked/stuck' to doStuff.py ? The idea just popped in to my head that maybe I can just leave off the doStuff.py on the "bin-path" part (though can't try this yet). Or another idea was to have doStuff.py take in inputs which are used to call other python scripts, though this doesn't seem like it would be the 'correct way'...
My second question is simpler: Every time I make a change/update files on the server (be it .html or .py files), I keep getting my old files when I go to them in the browser until I restart lighttpd. This doesn't seem normal that I need to restart after every single file change... any ideas?
If it helps, my end goal is to create a web ui to control various things and play sounds at various times (possibly via pygame as was suggested somewhere).