{% from 'macroses.j2' import render_rbac as render_rbac %} {% if file_exchanger_https_port != 443 %} Listen {{ file_exchanger_https_port }} {% endif %} # Add machine's IP address (use ifconfig command) {% if file_exchanger_user is defined and file_exchanger_user != None %} AuthType Basic AuthName "Authorised cgi-bin" AuthUserFile /etc/apache2/sites-available/{{ file_exchanger_name }}.htpasswd {% if file_exchanger_group is defined and file_exchanger_group != None %} AuthGroupFile /etc/apache2/sites-available/{{ file_exchanger_name }}.htaccess {% endif %} {% if file_exchanger_rbac is defined and file_exchanger_rbac != None %} {{ render_rbac(file_exchanger_rbac) }} {% else %} Require valid-user {% endif %} ScriptAlias /cgi-bin /var/www/file_exchanger_cgi-bin/ {% endif %} # Give an alias to to start your website url with DocumentRoot "{{ file_exchanger_path }}" Options Indexes FollowSymLinks AllowOverride None {% if file_exchanger_user is defined and file_exchanger_user != None %} AuthType Basic AuthName "Authentication Required" AuthUserFile /etc/apache2/sites-available/{{ file_exchanger_name }}.htpasswd {% if file_exchanger_group is defined and file_exchanger_group != None %} AuthGroupFile /etc/apache2/sites-available/{{ file_exchanger_name }}.htaccess {% endif %} {% if file_exchanger_rbac is defined and file_exchanger_rbac != None %} {{ render_rbac(file_exchanger_rbac) }} {% else %} Require valid-user {% endif %} Script PUT /cgi-bin/put {% else %} Require all granted {% endif %} ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined