Sunday, March 31, 2013

my project is not working in virtualenv in ubuntu?

hi,
   please tell me,what is issue with me, I am using virtualenv in ubuntu, i am fine in window,but here it's not showing admin pages,
   I have installed apache2 and wsgi, i want to run my project through my own apache2.but its not showing
my pages-
/var/www/mydomain.com/index.py 

import os
import sys
import site

# Add the site-packages of the chosen virtualenv to work with
site.addsitedir('~/.virtualenvs/DJ/local/lib/python2.7/site-packages')

# Add the app's directory to the PYTHONPATH
sys.path.append('/home/avnProject/avnProject')
sys.path.append('/home/avnProject/avnProject/avnproject')

os.environ['DJANGO_SETTINGS_MODULE'] = 'avnproject.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

AND
second file is-- path
/etc/apache2/sites-available/mydomain.com

<VirtualHost *:80>
    ServerAdmin avnesh@techhue.com
    ServerName localhost
    ServerAlias mydomain.com
    WSGIScriptAlias / var/www/mydomain.com/index.wsgi

    Alias /static/ /var/www/mydomain.com/static/
    <Location "/static/">
        Options -Indexes
    </Location >
</VirtualHost >

Myproject directory is ---- /home/avin/avnProject/

please help me....
i m trying localhost/mydomain.com then fine when I put localhost/mydomain.com/index.wsgi,then it's downloading it......
and i m unable to open admin page here


Thanks in advance.......
 


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment