WSGI:获得状态200确定而不是404
以下基于Apache 2.2,Windows和mod_wsgi 3.3的WSGI设置有什么问题? 问题在于,即使访问没有关联应用程序的URL(例如http:// wsgi / any ),客户端也会获得OK响应状态,而不是404状态码。 WSGI应用程序脚本文件: # C:\Programmi\Apache Software Foundation\Apache2.2\wsgi\scripts\app.wsgi def application(environ, start_response): status = '200 OK' output = 'App WSGI: Hello World!' response_headers = [('Content-type', 'text/plain'), ('Content-Length', str(len(output)))] start_response(status, response_headers) return [output] 虚拟主机: <VirtualHost *:80> ServerName wsgi WSGIScriptAlias / "C:\Programmi\Apache Software Foundation\Apache2.2\wsgi\scripts\app.wsgi" <Directory "C:\Programmi\Apache Software Foundation\Apache2.2\wsgi\scripts"> Order allow,deny Allow from all […]