LightTPD(Windows)上的Python flask应用程序获取[Errno 10013]试图以其访问权限所禁止的方式访问套接字
我有一个小烧瓶应用程序,我正试图在LightTPD web服务器上运行。当我用Python启动应用程序时,它运行良好。但当我试图让它在LightTPD/fast_cgi下运行时,我得到了 “[Errno 10013]试图以其访问权限所禁止的方式访问套接字” 每次我尝试启动web服务器时。在Web服务器和应用程序之间的某个地方,执行人员的权限发生了变化 我的LightTPD vhost.confg部件:LightTPD(Windows)上的Python flask应用程序获取[Errno 10013]试图以其访问权限所禁止的方式访问套接字,python,windows,sockets,lighttpd,Python,Windows,Sockets,Lighttpd,我有一个小烧瓶应用程序,我正试图在LightTPD web服务器上运行。当我用Python启动应用程序时,它运行良好。但当我试图让它在LightTPD/fast_cgi下运行时,我得到了 “[Errno 10013]试图以其访问权限所禁止的方式访问套接字” 每次我尝试启动web服务器时。在Web服务器和应用程序之间的某个地方,执行人员的权限发生了变化 我的LightTPD vhost.confg部件: $HTTP["host"] == "test.localhost" { server.do
$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"
)
}
和我的测试应用程序:
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()
我已经没有办法尝试了。禁用防火墙和防病毒软件,以管理员身份运行LightTPD和Python.exe,但似乎什么都不起作用。它工作了一小会儿,但我不知道这是偶然的,还是我在某处改变了一些小细节。
我的下一步将是将其移动到cgi。
如果这不起作用,我将尝试ngnix,或者其他一些轻型httpd服务器 10013点指向端口问题。它可能被防火墙阻止或已在使用。