Sometimes I restrict access to our Indico instance during maintenance/updates when I want to check something on the website first without other users already accessing and logging in again. I do that by only allowing my ip address which works fine:
###Added to /etc/apache2/sites-available/indico.conf :
<Location "/">
Require ip my-ip-address
</Location>
However, other users visiting during that time are faced with a 403 Forbidden error page which isn’t very nice and I’d like to redirect them to a simple html page on the same server stating something along the lines of “Maintenance is currently in progress.”
This should be possible with:
###/*Added to /etc/apache2/conf-available/localized-error-pages.conf :
ErrorDocument 403 /opt/indico/customdir/maintenance/maintenance.html
and
###/*Added to /etc/apache2/sites-available/indico.conf :
<Directory "/opt/indico/customdir/maintenance/">
Require all granted
</Directory>
I’ve tried with a few different file paths like /customdir/maintenance/, /customdir/files/ or even /var/www/html/ but nothing has worked for me so far. I get either the 403 error page (now stating that two 403 errors have occured) or a Not Found Indico page which looks like this:
Permissions on the file and directory are the same as the rest of the customization directory.
I’d be happy if someone could point out any mistakes I made or knows where I can put the html file on the server so that the webserver finds and displays it. Redirecting from the 403 error in itself is possible, I have tried redirecting to an external website and that works just fine.