Question

Hosting Web.Py using mod_wsgi under apache2 not working

  • Posted November 29, 2014
  • 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>
Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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.