Apache - How to enable/load external Module (WSGI) ?

System:
openSUSE 13.1 (LXDE)
Apache 2.4.6-6.10.1

Scenario:
Attempting to install a Django app (Graphite Server).
Implementation uses the Python WSGI module

Setup:
After default Graphite Server install which provides an entrypoint “/opt/graphite/conf/graphite.wsgi”

  • Installed Apache
  • Installed module “apache2-mod_wsgi”
  • Installed YAST HTTP Server module (interesting it’s not listed as a dependency for apache2 so has to be installed manually)
  • Ran YAST HTTP Server config enabing python scripting and binding to all interfaces and opening firewall port
  • Following the instructions at https://docs.djangoproject.com/en/1.2/howto/deployment/modwsgi/
    I created a custom apache config file by the following

echo " WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi" > /etc/apache2/httpd.conf.local

Result is

 
Feb 26 09:13:39 GRAPHITE-1.site start_apache2[7051]: AH00526: Syntax error on line 1 of /etc/apache2/httpd.conf.local:
Feb 26 09:13:39 GRAPHITE-1.site start_apache2[7051]: Invalid command 'WSGIScriptAlias', perhaps misspelled or de...tion

Am unable to figure out how to enable this external Apache module.

TIA,
TSU

tsu2 wrote:
> Result is
>
> Code:
> --------------------
>
> Feb 26 09:13:39 GRAPHITE-1.site start_apache2[7051]: AH00526: Syntax error on line 1 of /etc/apache2/httpd.conf.local:
> Feb 26 09:13:39 GRAPHITE-1.site start_apache2[7051]: Invalid command ‘WSGIScriptAlias’, perhaps misspelled or de…tion
>
> --------------------

mod_wsgi isn’t loaded. So first check what modules are loaded, to make
sure I’m not lying :slight_smile: Then look in the Apache error log to see why it
hasn’t loaded, assuming you really did try to load it!

Well, it doesn’t appear to be loaded.
(That’s why the subject line)

But, I’m finding it hard to find how to load this class of module.
There are many classes of modules and from what I’ve read the procedures to load and list each class of module are different. The instructions for instance how to load an SSL module wouldn’t be the same as for this class of “external” module.

Thx,
TSU

As often the case, sometimes solutions can be found using different search terms…

Readng through some highly complicated pages on setting up wsgi, I found the simple solution.
Apparently loading the wsgi module doesn’t require anything very special,

I simply added to the top

/etc/apache2/httpd.conf


LoadModule wsgi_module /usr/lib64/apache2/mod_wsgi.so

Nothing special. Now wsgi loads successfully (starting apache service doesn’t throw an error any longer).
Now on to fixing the next issue…

Thx,
TSU