Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

what's wrong with the following WSGI setup based on Apache 2.2, Windows and mod_wsgi 3.3? The problem is that the client gets an OK response status even visiting URLs that don't have an associated application (e.g. http://wsgi/any), instead of 404 status code.

WSGI Application Script File:

# 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]

Virtual host:

<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

Host file for name resolution:    wsgi

Many thanks.

share|improve this question
up vote 0 down vote accepted


WSGIScriptAlias / ...

means send all requests for URLs under '/' to the WSGI application. In other words, every request to your site will be handled by the WSGI application.

So, there is nothing wrong as that is what you have told it to do.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.