> On 27 Apr 2016, at 8:56 PM, Raphaël .E <[email protected]> wrote:
> 
> hi everybody,
> I am facing a problem for 2 days making running my project into production.
> My project is called 'rfaapp' and when i try to access a page there is this 
> apache error : Importerror no module named rfaapp.
> 
> this is my 000-default.conf:
> <VirtualHost *:80>
>   <Directory /home/adminrfaapp/rfaapp/static>
>                 Require all granted
>         </Directory>
> 
>         <Directory /home/adminrfaapp/rfaapp/rfaapp>
>                 <Files wsgi.py>
>                         Require all granted
>                 </Files>
>         </Directory>
>         #WSGIDaemonProcess rfa 
> python-path=/home/adminrfaapp/.local/lib/python3.5
> 
>         WSGIDaemonProcess rfaapp 
> python-path=/home/adminrfaapp/rfaapp/rfaapp:/home/adminrfaapp/.local/lib/python3.5

This should be:

   WSGIDaemonProcess rfaapp python-path=/home/adminrfaapp/rfaapp

Note one directory at end removed.

As to the per user packages directory, you may be better off using a proper 
virtual environment and then using the ‘python-home’ option to refer to it.

>         WSGIProcessGroup rfaapp
>         WSGIScriptAlias / /home/adminrfaapp/rfaapp/rfaapp/wsgi.py
> 
> </VirtualHost>
> my wsgi.py
> 
> """
> WSGI config for rfaapp project.
> 
> It exposes the WSGI callable as a module-level variable named ``application``.
> 
> For more information on this file, see
> https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
> """
> 
> import os
> import sys
> 
> from django.core.wsgi import get_wsgi_application
> sys.path.append('home/adminrfaapp/rfaapp’)

This may not have worked due to missing leading ‘/‘ on path. It shouldn’t have 
been required when using ‘python-path’ option.

> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "rfaapp.settings")
> 
> application = get_wsgi_application()
> 
> 
> anyone has a idea?
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/modwsgi 
> <https://groups.google.com/group/modwsgi>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to