I'm trying to deploy a hello flask app to a raspberry pi using lighttpd fastCGI.
I followed the instructions on the http://flask.pocoo.org/docs/0.10/deploying/fastcgi/ to the best of my ability
Here is my flask app (/var/www/demoapp/hello.py)
from flask import Flask
app = Flask(__name__)@app.route("/")
def hello():return "Hello World From Flask Yeh!"if __name__ == "__main__":app.run(host='0.0.0.0', port=5000)
And here is my .fcgi file (/var/www/demoapp/hello.fcgi)
#!/usr/bin/python
from flup.server.fcgi import WSGIServer
from yourapplication import appif __name__ == '__main__':WSGIServer(app).run()
And here is what I added to my /etc/lighttpd/lighttpd.conf
fastcgi.server = ("/hello.fcgi" =>(("socket" => "/tmp/hello-fcgi.sock","bin-path" => "/var/www/demoapp/hello.fcgi","check-local" => "disable","max-procs" => 1))
)alias.url = ("/static/" => "/var/www/demoapp/static/",
)
I get a 404 Not Found error
By the way what is the /tmp/hello-fcgi.sock where do I get this file
Please help. I'm essentially trying to find a simple way to deploy flask on my raspberry pi web server. I have tried several methods. The fastcgi seemed to be the easiest. If there is an easier way then let me know please.
Thank you
Vincent