Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Configure mod_wsgi for Django

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
1 post • Page 1 of 1
afidegnum
Posts: 4
Joined: Wed Sep 10, 2014 9:16 am

Configure mod_wsgi for Django
  • Quote

Post by afidegnum » Wed Sep 10, 2014 9:19 am

HI

I have installed django and virtualenv I have configure my domain to run on wsgi

but when i launhed the page. I am still facing internal server error.

meanwhile this is the he content of django.wsgi

Code: Select all

import os, sys
sys.path.insert(0, '/home/admin/web/django.alexprohost.com/private/django/django.alexprohost.com/env/lib/python2.6/site-packages')
sys.path.insert(0, '/home/admin/web/django.alexprohost.com/private/django/django.alexprohost.com/project/src/shared/')
sys.path.insert(0, '/home/admin/web/django.alexprohost.com/private/django/django.alexprohost.com/project/src/')

os.environ['DJANGO_SETTINGS_MODULE'] = 'main.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
currently I have python 2.7.2
how do I fix this please?

and here is the error message I am actually getting.

Code: Select all

[Wed Sep 10 10:02:52 2014] [error] [client 85.242.136.12] mod_wsgi (pid=31913): Target WSGI script '/home/admin/web/django.alexprohost.com/public_html/django.wsgi' cannot be loaded as Python module.
[Wed Sep 10 10:02:52 2014] [error] [client 85.242.136.12] mod_wsgi (pid=31913): Exception occurred processing WSGI script '/home/admin/web/django.alexprohost.com/public_html/django.wsgi'.
[Wed Sep 10 10:02:52 2014] [error] [client 85.242.136.12] Traceback (most recent call last):
[Wed Sep 10 10:02:52 2014] [error] [client 85.242.136.12]   File "/home/admin/web/django.alexprohost.com/public_html/django.wsgi", line 7, in <module>
[Wed Sep 10 10:02:52 2014] [error] [client 85.242.136.12]     import django.core.handlers.wsgi
[Wed Sep 10 10:02:52 2014] [error] [client 85.242.136.12] ImportError: No module named django.core.handlers.wsgi
By the way, I am using the latest VestaCP on Debian 7 (Wheezy)
Top


Post Reply
  • Print view
1 post • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password