> On 12 May 2016, at 4:33 PM, Jaqen Nki <[email protected]> wrote:
> 
> Ok this is not working, I found a snippet to add to .wsgi file that flask 
> docs said to add for virtualenvs which is good,  all my conf files are now 
> setup properly:
> 
>             /var/www/site1/FlaskApp/flaskapp.wsgi  :
> 
> activate_venv = '/var/www/site1/FlaskApp/FlaskApp/venv/bin/activate'
> execfile(activate_venv, dict(__file__=activate_venv))
> 
> import sys
> import logging
> logging.basicConfig(stream=sys.stderr)
> sys.path.insert(0,"/var/www/site1/FlaskApp/")
> 
> from FlaskApp import app as application
> application.secret_key = 'a7j3sk29dk6gh4n69x0n70nn81mps'
> 
> 
> But apache says "ERROR:  module wsgi does not exist!"  when I try to enable 
> it.  (I dont get it because with the earlier command it outputted the 
> location of the installed module) :
> 
> sudo a2enmod wsgi

Where did you put that LoadModule and WSGIPythonHome directives that were 
output by the install-module command?

For a2enmod to work, you would need to have created a ‘wsgi.load’ file in the 
‘modules-available’ directory of Apache. All that script would then do is 
symlink that file into ‘modules-enabled’.

If you had manually added the LoadModule and WSGIPythonHome directives into the 
Apache configuration you do not need to run a2enmod, just restart Apache.

You also should not need:

activate_venv = '/var/www/site1/FlaskApp/FlaskApp/venv/bin/activate'
execfile(activate_venv, dict(__file__=activate_venv))

as the WSGIPythonHome directive should already have enabled things for the 
Python virtual environment.

Graham

-- 
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