Hi,
I want to password protect an entire staging site, so httpauth -wp-admin=on isn't enough. Based on a few answers on similar topics, my understanding is that in order to achieve that, I will have to edit the nginx config files under /etc/nginx/common
If I do so, though, wouldn't my changes get lost after a Webinoly update? At least that's what the warnings on those files suggest.
So, I was wondering if there is a better way to do it. I tried creating a custom-nginx.conf file on the root on my site and added the following rule:
location = / {
include common/acl.conf;
}
It will password protect the Homepage, but not the internal pages. If i remove = and keep only location /, nginx -t throws an error saying that location / is a duplicate.
If I do location ~ / It will password protect everything, but after signing in, only the home page works. The rest of the pages will throw a server error.
Thanks in advance for any suggestions
George