Vote count:
0
I have a small Flask app that I am trying to get running on LightTPD web server. The app runs fine when I start it with Python. But when I try to make it run under LightTPD/fast_cgi, I get
"[Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions"
every time I try to start the web server. Somewhere between the webserver and the app the permission of the executive changes.
My LightTPD vhost.confg part:
$HTTP["host"] == "test.localhost" {
server.document-root = "c:/data/python/test"
dir-listing.activate = "disable"
accesslog.filename = log_root + "/test.log"
server.errorlog = log_root + "/test-error.log"
fastcgi.server = (
"/" => ((
#"socket" => "c:\tmp\test-sock", # no file sockets in windows
"host" => "127.0.0.1",
"port" => "12345",
"bin-path" => "c:/data/python/test/test.fcgi",
"check-local" => "disable",
"max-procs" => 1,
"fix-root-scriptname" => "enable"
)),
)
alias.url = (
"/static" => "c:/data/python/test/app/static"
)
url.rewrite-once = (
"^(/static($|/.*))$" => "$1",
"^(/.*)$" => "/test.fcgi$1"
)
}
And my test app:
from flup.server.fcgi import WSGIServer
def test_app(environ, start_response):
start_response('200 OK', [('Content-Type', 'text/plain')])
yield 'Hello, world!\n'
WSGIServer(app, bindAddress=('127.0.0.1', 12345)).run()
I have run out of options to try. Disabled the firewall and anti-virus software, run LightTPD and Python.exe as administrator, but nothing seems to work. It worked for a brief moment, but I don't know if it was a fluke, or I changed some tiny detail somewhere. My next step will be to move this to a cgi. If this doesn't work, I'm going to try ngnix, or some other light httpd server.
Python flask apps on LightTPD (Windows) get [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions
Aucun commentaire:
Enregistrer un commentaire