Hosting Web.Py using mod_wsgi under apache2 not working

Posted November 29, 2014 3.2k views

Hello there,

I have been trying to host my simple REST API application and it is somehow not working… PLEASE HELP.
Here is my Apache2 config snippet.

<VirtualHost *:80>
   DocumentRoot /var/www/mysite
   ServerAlias Centos
WSGIScriptAlias /service /var/www/mysite/
  Alias /static /var/www/mysite/
  AddType text/html .py

  <Directory /var/www/mysite>
      Order deny,allow
      Allow from all
    #  SetHandler wsgi-script
    # Options ExecCGI  
       Options Indexes FollowSymLinks Includes ExecCGI

edited by asb

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Without more information, it’s hard to answer this question. A good first place to look is always the error logs. On Ubuntu, Apache’s can be found at: /var/log/apache2/error.log

When working with mod_wsgi, if you need to dig deeper into why something isn’t working as expected, the “Debugging Techniques” section of its documentation provides a lot of valuable information. Webpy’s own docs on using mod_wsgi may be helpful as well.