diff --git a/templates/logs-dev.vhost.erb b/templates/logs-dev.vhost.erb index 07cbaa9..268e374 100644 --- a/templates/logs-dev.vhost.erb +++ b/templates/logs-dev.vhost.erb @@ -67,14 +67,18 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %> Satisfy Any - # Redirect .*/<%= @ara_middleware_database_directory %> to the ARA sqlite wsgi middleware - # This middleware automatically loads the ARA web application with the - # database located at .*/<%= @ara_middleware_database_directory %>/ansible.sqlite. + # ARA sqlite middleware configuration + # See docs for details: https://ara.readthedocs.io/en/latest/advanced.html SetEnv ARA_WSGI_TMPDIR_MAX_AGE <%= @ara_middleware_tmpdir_max_age %> SetEnv ARA_WSGI_LOG_ROOT <%= @docroot %> SetEnv ARA_WSGI_DATABASE_DIRECTORY <%= @ara_middleware_database_directory %> - WSGIScriptAliasMatch ^.*/<%= @ara_middleware_database_directory %> /usr/local/bin/ara-wsgi-sqlite + # Redirect .*/<%= @ara_middleware_database_directory %> to the ARA sqlite wsgi middleware + # This middleware automatically loads the ARA web application with the + # database located at .*/<%= @ara_middleware_database_directory %>/ansible.sqlite. + # If we get a request directly to the database file, don't load the middleware + # so that users can download the raw database if they wish. + WSGIScriptAliasMatch ^.*/<%= @ara_middleware_database_directory %>(?!/ansible.sqlite) /usr/local/bin/ara-wsgi-sqlite # Everything beyond this point is rewritten to htmlify. # Make sure we don't do that for dynamic ARA reports.