Wieder was gelernt

Apache /server-status vs WSGI

2020-09-04 (Friday)
Tags: apache wsgi python monitoring

When writing web applications, it is often necessary (or at least more aesthetic) to make the home page part of the application. Using mod_wsgi, this looks like this: WSGIScriptAlias / /var/www/mysite/app/myapp/myapp/wsgi.py Static files can be exempted via aliases: Alias /robots.txt /var/www/mysite/htdocs/robots.txt Alias /favicon.ico /var/www/mysite/htdocs/favicon.ico Alias /static/ /var/www/mysite/htdocs/static/ If you want to enable mod_status the normal approach doesn’t work: <Location "/server-status"> SetHandler server-statusĀ· Require ip 192.0.2.0/24 </Location> /server-status will be passed to WSGI handler instead of the server-status handler, no matter how you arrange the directives.