Hosting Web.Py using mod_wsgi under apache2 not working

November 29, 2014 427 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

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.

Have another answer? Share your knowledge.