Loading a module from /usr/lib/modules into Apache

6.1k views Asked by At

I follows this guide http://modwsgi.readthedocs.io/en/develop/user-guides/quick-installation-guide.html. And have gotten to the point where I have to load the module, but when I run the LoadModule command I get:

LoadModule: command not found

I am using ubuntu 16.04. I have apache installed and the mod_wsgi.so file in /usr/lib/apache2/modules directory. Here is the command I am running

LoadModule mod_wsgi /usr/lib/apache2/modules/mod_wsgi.so

Any help would be appreciated. I honestly do not understand why this would not work. I have done some research and have found nothing useful on this. To be clear I am a developer that is changing over from PHP to Python for my api coding and am non a sys admin. Have mercy on my ignorance of Apache's inner workings. I know very little about the subject.

2

There are 2 answers

1
Daniel Roseman On BEST ANSWER

In Debian-based systems like Ubuntu, the a2enmod command is provided to set up Apache modules correctly. So, from your shell, do sudo a2enmod wsgi.

4
RaminNietzsche On

LoadModule is only for Apache configure file, You can't run it as a command in bash or somewhere else.

You must edit httpd.conf or apache2.conf in ubuntu.

Read this.