# HG changeset patch # User Heiko Schlittermann # Date 1451513915 -3600 # Node ID e63ab2989a8df255fbbf3401955b640e12a1d4af # Parent 6510dc15390bcac20e4d1a1a6339f8fde97d3d13 Use for configuration diff -r 6510dc15390b -r e63ab2989a8d configs/apache.conf --- a/configs/apache.conf Tue Dec 29 23:39:37 2015 +0100 +++ b/configs/apache.conf Wed Dec 30 23:18:35 2015 +0100 @@ -1,39 +1,45 @@ -# -> /etc/apache2/conf.d +# This file should be placed as +# -> /etc/apache2/conf-available/once.conf +# and then you may use `a2enconf once` + + SetEnv ONCE_VAR $var + SetEnv ONCE_LIB $lib -# The directory where the files are stored, -# it needs to be writable by the web server user (wwwrun, www-data, -# who ever) -# SentEnv may go into the ... -SetEnv ONCE_VAR /var/lib/once/ - - -# Action may go into ... -Action once-handler /once-handler/once.cgi virtual + # The directory where the files are stored. + # This directory needs to be r/w by the web server user + # (wwwrun, www-data, who ever), but it must not be + # accessible via HTTP(s) + + Require all denied + -# Order of location blocks matters! - - SetHandler once-handler - - - SetHandler none - + Action once-handler /once-handler/once.cgi virtual + ScriptAlias /once-handler/ $lib/ + Alias $location/public $lib/public -# -# SetHandler once-download-handler -# Action once-download-handler /once-handler/download.pl virtual -# + # Order of location blocks matters! + # We handle requests to our script, with the exception (see below) + # for …/public/… requests. These should be answered from a simple + # static directory for style sheets and similiar + + SetHandler once-handler + + + SetHandler none + -Alias /once/public /usr/local/lib/once/public - + Require all granted Allow from all - - + -ScriptAlias /once-handler/ /usr/local/lib/once/ - + Require all granted Allow from all Options ExecCGI FollowSymlinks - + + + +Use ONCE /once /var/lib/once /usr/local/lib/once +UndefMacro ONCE