Tuesday, April 2, 2013

Re: my project is not working in virtualenv in ubuntu?

It looks to me like your wsgi script is name index.py (which is fine)
but you are referencing index.wsgi in your apache conf which probably
doesn't exist. Have a look through your error logs and you might see
the same.

On Mar 31, 12:20 am, Avnesh Shakya <avnesh.n...@gmail.com> wrote:
> 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 avn...@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