Most likely the issue is because a2enmod only generally works for Apache 
modules that were installed from the operating system packages.

In order to use it with mod_wsgi compiled from source code you would need to 
first create the Apache configuration file that a2enmod is expecting to find. I 
don’t remember the name of this and what directory it is in.

Look in the Apache configuration directories and see if you can find a 
directory something like modules-availalable. Following the naming convention 
for files in there, create a file (probably wsgi.load), which includes the 
LoadModule line for loading the wsgi_module. Then you can run a2enmod.

Do be aware though that it looks like Anaconda may still be shipping a Python 
that doesn’t work in embedded systems. So even after configuring it may not 
work. This is an issue with Anaconda as far as I know and how they have 
modified how Python finds where it is installed.

At the minimum, to ensure it finds the Anaconda Python shared library, you will 
need to rebuild the source code using:

make distclean
LD_RUN_PATH=/home/user/miniconda3/envs/e1/lib ./configure 
--with-python=/home/user/miniconda3/envs/e1/bin/python
make
sudo make install

Note that only the install needs to run as root, not the unpacking of source 
code, configure or build.

Graham

> On 7 Apr 2016, at 10:16 PM, Florian Hoedt <[email protected]> wrote:
> 
> hello,
> I get an Module mod_wsgi does not exist! error trying to install mod_wsgi for 
> apache for a conda env.
> I have done the following:
> ---
> # get apache2-dev
> sudo apt-get install apache2-dev
> 
> #get miniconda
> bash Miniconda3-latest-Linux-x86_64.sh
> 
> #create conda env
> conda create -n e1 python=python2.7
> 
> ### mod_wsgi install: 
> http://modwsgi.readthedocs.org/en/latest/user-guides/quick-installation-guide.html
> # mod_wsgi source code from
> # https://github.com/GrahamDumpleton/mod_wsgi/archive/4.5.1.tar.gz
> # into ~/source
> # untar mod_wsgi versoin 4.5.1. source code 
> sudo tar xvfz mod_wsgi-4.5.1.tar.gz
> 
> # configure mod_wsgi source code with conda env
> sudo ./configure --with-python=/home/user/miniconda3/envs/e1/bin/python
> 
> >> outputs
> (e1)user@geonode-dev:~/source/mod_wsgi-4.5.1$ sudo ./configure 
> --with-python=/home/user/miniconda3/envs/e1/bin/python
> checking for apxs2... /usr/bin/apxs2
> checking for gcc... gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> checking for prctl... yes
> checking Apache version... 2.4.7
> configure: creating ./config.status
> config.status: creating Makefile
> >>
> # make install
> sudo make install
> 
> # enabling mod_wsgi for apache2
> sudo a2enmod mod_wsgi
> >> ERROR: Module mod_wsgi does not exist!
> ---
> 
> what is wrong with this?
> 
> -- 
> 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