Hosting Web.Py using mod_wsgi under apache2 not working

November 29, 2014 602 views
Apache

Hello there,

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

<VirtualHost *:80>
   ServerAdmin webmaster@MySite.com
   DocumentRoot /var/www/mysite
   Servername 128.199.241.142
   ServerAlias Centos www.MySite.com
WSGIScriptAlias /service /var/www/mysite/MyApp.py/
  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
  </Directory>

 </VirtualHost>
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.