Results 1 to 4 of 4

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

  1. #1
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default 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....yment/modwsgi/
    I created a custom apache config file by the following
    Code:
    echo " WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi" > /etc/apache2/httpd.conf.local
    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
    Am unable to figure out how to enable this external Apache module.

    TIA,
    TSU

  2. #2

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

    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 Then look in the Apache error log to see why it
    hasn't loaded, assuming you really did try to load it!

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

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

    Quote Originally Posted by djh-novell View Post
    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 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

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

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

    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
    Code:
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •