I have installed apache2 into my home folder by specifying the ./configure –prefix="$HOME". It works fine. Now I am trying to install mod_wsgi. I try ./configure –prefix="$HOME", as well as –libexecdir="$HOME", however when performing a make install I get the following:
/usr/sbin/apxs -i -S LIBEXECDIR=/usr/libexec/apache2 -n 'mod_wsgi' mod_wsgi.la
/usr/share/httpd/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1/build-1/libtool/mod_wsgi.la /usr/libexec/apache2
/usr/share/apr-1/build-1/libtool --mode=install cp mod_wsgi.la /usr/libexec/apache2/
libtool: install: cp .libs/mod_wsgi.so /usr/libexec/apache2/mod_wsgi.so
cp: /usr/libexec/apache2/mod_wsgi.so: Permission denied
apxs:Error: Command failed with rc=65536
I'm guessing it's since I don't do sudo, but I don't want to. How can I make it install into Home, so that sudo isn't necessary. I feel like this should be obvious but maybe I'm missing something.
Best Answer
The correct way is not to copy the mod_wsgi.so file by hand, but use the --with-apxs option to configure for mod_wsgi when you build it to tell it where your Apache installation's apxs script is:
By not doing this you have compiled mod_wsgi against the wrong Apache and the result could be incompatible with the Apache you have in your home directory.
The use of the --with-apxs option is clearly described towards the start of the installation instructions.
So long at you use --with-apxs, the install step should copy it to the correct Apache installation.