Attempting to use mod_wsgi in daemon mode show default apache "It works!" page instead of application
I've got a Python WSGI app that I've written and runs with apache2 + mod_wsgi in embedded mode, and I'm trying to get it to run in daemon mode.

Problem is, with the configuration (below), instead of seeing the app I see the default Apache2 "It works!" page which, despite the zeal with which it states its operational status, is wrong.

I have only sanitised the appname and urls etc, so you're seeing the entire apache conf that I'm using.


    <VirtualHost *:80>
      ServerName app.example.com
      ServerAlias app
    
      WSGIDaemonProcess appname user=www-data group=www-data processes=5 threads=5 display-name=%{GROUP} maximum-requests=1000
      WSGIScriptAlias / /usr/share/app/app/application.wsgi

      Alias /static /usr/share/app/app/static

      ErrorLog /var/log/apache2/app/error.log
      CustomLog /var/log/apache2/app/access.log common

    <Directory /usr/share/app/app>
        WSGIProcessGroup appname
        Order allow,deny
        Allow from All
    </Directory>

    <Directory /usr/share/app/app/static>
        Order allow,deny
        Allow from All
    </Directory>
    </VirtualHost>

No matter whether I put the WSGIProcessGroup option inside the <Directory> section, or just in the main <VirtualHost> section, this still just shows the "It works!" page.

The app is using bottle and toscawidgets, with wsgi validator to make sure it's all behaving nicely. The code I use to construct the application:

    import bottle
    import tw.api
    from wsgiref.validate import validator
    #.... A whole buttload of code
    application = bottle.default_app()
    application = tw.api.make_middleware(application, stack_registry=True)
    application = validator(application)
Attempting to use mod_wsgi in daemon mode show default apache "It works!" page instead of application
===

I've got a Python WSGI app that I've written and runs with apache2 + mod_wsgi in embedded mode, and I'm trying to get it to run in daemon mode.

Problem is, with the configuration (below), instead of seeing the app I see the default Apache2 "It works!" page which, despite the zeal with which it states its operational status, is wrong.

I have only sanitised the appname and urls etc, so you're seeing the entire apache conf that I'm using.


    <VirtualHost *:80>
      ServerName app.example.com
      ServerAlias app
    
      WSGIDaemonProcess appname user=www-data group=www-data processes=5 threads=5 display-name=%{GROUP} maximum-requests=1000
      WSGIScriptAlias / /usr/share/app/app/application.wsgi

      Alias /static /usr/share/app/app/static

      ErrorLog /var/log/apache2/app/error.log
      CustomLog /var/log/apache2/app/access.log common

    <Directory /usr/share/app/app>
        WSGIProcessGroup appname
        Order allow,deny
        Allow from All
    </Directory>

    <Directory /usr/share/app/app/static>
        Order allow,deny
        Allow from All
    </Directory>
    </VirtualHost>

No matter whether I put the WSGIProcessGroup option inside the <Directory> section, or just in the main <VirtualHost> section, this still just shows the "It works!" page.

The app is using bottle and toscawidgets, with wsgi validator to make sure it's all behaving nicely. The code I use to construct the application:

    import bottle
    import tw.api
    from wsgiref.validate import validator
    #.... A whole buttload of code
    application = bottle.default_app()
    application = tw.api.make_middleware(application, stack_registry=True)
    application = validator(application)