say090u
By:
say090u

mod_wsgi configuration with apache2

June 4, 2016 1.5k views
Python Frameworks Apache Deployment LAMP Stack Applications Ubuntu

hello there

im running python bottle framwork with apache2 via wsgi handling

the problem i had it is that my website (Ip address ) still display the error page 500 !!
without showing the html pages from handling from wsgi script !

this the app.wsgi file (the error is not in this file I'm sure):

import sys,os ,bottle
sys.path.append('/var/www/apabtl/')
import hello
application = bottle.default_app()
  • hello is my bottle script (which returned & renders the html pages)

this is may 000-default.conf :

ServerName 147.178.331.204
ServerAdmin  YU@gmail.com
ServerRoot "/var/www/apabtl"
DocumentRoot "/var/www/apabtl"
#ServerName 147.178.331.204
WSGIDaemonProcess apabtl  threads=5
WSGIScriptAlias / /var/www/apabtl/app.wsgi
<Directory /var/www/apabtl>
     <Files app.wsgi>
         Require all granted
      </Files>
</Directory>

  • apabtl is my application.

please can you help me (:

1 comment
  • Hi @say090u,

    Do you by any chance have any errors in your logs? From the look of your configuration I assume your application is misbehaving. Do you know if your application works in python without Apache?

1 Answer

Sorry to see that your question hasn't received an answer yet. Unfortunately, after this much time, it is unlikely that an answer for this specific question will be provided. For people still landing here via search, check out this tutorial. It shows you how to get up and running with Django, Apache, and mod_wsgi on Ubuntu:

Django is a powerful web framework that can help you get your Python application or website off the ground quickly. Django includes a simplified development server for testing your code locally, but for anything even slightly production related, a more secure and powerful web...
Have another answer? Share your knowledge.