installing mod_wsgi giving 403 error

Posted by John Smiith on Server Fault See other posts from Server Fault or by John Smiith
Published on 2012-07-04T12:45:42Z Indexed on 2012/07/04 15:17 UTC
Read the original article Hit count: 225

Filed under:
|

installing mod_wsgi giving 403 error

httpd.conf i added code below

WSGIScriptAlias /wsgi "C:/xampp/www/htdocs/wsgi_app/wsgi_handler.py"

   <Directory "C:/xampp/www/htdocs/wsgi_app/">
    AllowOverride None
    Options None
    Order deny,allow
    Allow from all
    </Directory>

wsgi_handler.py

status = ‘200 OK’
output = ‘Hello World!’
response_headers = [('Content-type', 'text/plain'), ('Content-Length', str(len(output)))]
start_response(status, response_headers)
return [output]

Note: localhost is my virtual host domain and it is working fine but when i request http://localhost/wsgi/ got 403 error.

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "C:/xampp/www/htdocs/localhost"
    ServerName localhost
    ServerAlias www.localhost
    ErrorLog "logs/localhost-error.log"
    CustomLog "logs/localhost-access.log" combined
</VirtualHost>

Error log

[Wed Jul 04 06:01:54 2012] [error] [client 127.0.0.1] File does not exist: C:/xampp/www/htdocs/localhost/favicon.ico
[Wed Jul 04 06:01:54 2012] [error] [client 127.0.0.1] client denied by server configuration: C:/xampp/Bin/apache
[Wed Jul 04 06:01:58 2012] [error] [client 127.0.0.1] Options ExecCGI is off in this directory: C:/xampp/www/htdocs/wsgi_app/wsgi_handler.py
[Wed Jul 04 06:01:58 2012] [error] [client 127.0.0.1] client denied by server configuration: C:/xampp/Bin/apache
[Wed Jul 04 06:01:58 2012] [error] [client 127.0.0.1] File does not exist: C:/xampp/www/htdocs/localhost/favicon.ico
[Wed Jul 04 06:01:58 2012] [error] [client 127.0.0.1] client denied by server configuration: C:/xampp/Bin/apache

Note: My apache is not in c:/xampp/bin/apache it is in c:/xampp/bin/server-apache/

© Server Fault or respective owner

Related posts about apache2

Related posts about mod-wsgi