How to limit access to OJS during a period?

We run an OJS 2.4.3 server. We’ll upgrade it to 2.4.6 and add modifications to the code. So we need to limit/stop access to the server during few hours.
I think to 2 ways to do that :
. Apache auth modules
. “installed = off” in config.inc.php
Is there another method you recommend ?
Thanks,
Jean-Luc

Personally, I create a new directory with a “maintenance” index.html and set as to the DocumentRoot in Apache with a rewrite to temporarily redirect all traffic to that page.

This could even be qualified to allow certain IPs access to the regular site so you can test things before bringing it back online to the public.

Thanks Clinton,
I’ve followed your recommendation. Not exactly the same way but very similar:
. Create a ojs-maintenance.html file with a maintenance message
. Activate the Mod_rewrite apache module
. Add a .htaccess in the OJS directory (133.133.2.2 is my IP @, 129.88.2.2 the IP @ of another tester):

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^133\.133\.2\.2$
RewriteCond %{REMOTE_ADDR} !^129\.88\.2\.2$
RewriteRule ".*" "ojs/ojs-maintenance.html"
</IfModule>   

So 133.133.2.2 and 129.88.2.2 are the only machines that may access to OJS.
It has worked very fine.

3 Likes

Hi @ctgraham,

you are still using this way or in OJS 3 exist some function for that?

thanks!

I have not used the above methods, but the answer the original question, I usually just add a simple htaccess file that checks the user IP and allow only for my own IP.

Also, a few hours before closing the server, I add a big red notification text the to dashboard layout for everyone to see, which tells the time when the system will be closed. This way I try to prevent situations where the closing of the server cuts someones submission or review process.

2 Likes