> On 11 May 2016, at 10:37 PM, Jaqen Nki <[email protected]> wrote:
> 
> Cool so ubuntu 16 is running very smooth, all updated software dists, and 
> seems faster.  Pyvenv is fixed and have all my packages installed in the 
> venv.  I used
> 
> pip3 install mod-wsgi     then ran express start, works fine on port 8000, 
> and testinit.py works on port 5000
> 
> Now for the apache2 config.  Id like it to behave like Ive had, set and 
> forget, just boot up server and hit up my host browser - rather than have to 
> run CLI commands everytime I boot server.  Not really sure how modwsgi 
> express is convenient /practical for development and definitely not in a 
> production environment, when someone can configure once.
> 
> Now I just need to figure how to connect apache to the venv with modwsgi.  
> Thanks almost there.

There is a way of having mod_wsgi-express just generate all the configuration 
and save it. You could then just start it up with the already setup 
configuration from a system init script. This is partly explain on the PyPi 
page.

If you are already familiar though with integrating mod_wsgi into the main 
Apache, what you can do is after having created your virtual environment and 
installed mod_wsgi into using pip, run:

    sudo mod_wsgi-express install-module

That will copy the compiled mod_wsgi.so into the modules directory of your 
Apache installation.

That command should also output a couple of lines which is the Apache 
configuration snippet you would include in the Apache configuration for loading 
the mod_wsgi module and setting the correct location for the Python virtual 
environment you want to use, based on what it was installed into.

So would output something like:

    LoadModule wsgi_module modules/mod_wsgi-py34.so
    WSGIPythonHome /some/path/to/venv

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