<![CDATA[ How to prevent IP's from access website using ModxCloud? - My Forums]]> https://forums.modx.com/thread/?thread=104908 <![CDATA[How to prevent IP's from access website using ModxCloud?]]> https://forums.modx.com/thread/104908/how-to-prevent-ip-s-from-access-website-using-modxcloud#dis-post-564090
location /manager/ {
    allow 10.10.10.192;
    deny all;
}


Is there a way to prevent ANYONE outside of a designated IP from accessing the website.

My scenario is: I am opening up a website for testing internally and do not want to provide user names for EVERY person. Any help will be appreciated.]]>
smorris Feb 14, 2019, 08:47 PM https://forums.modx.com/thread/104908/how-to-prevent-ip-s-from-access-website-using-modxcloud#dis-post-564090
<![CDATA[Re: How to prevent IP's from access website using ModxCloud?]]> https://forums.modx.com/thread/104908/how-to-prevent-ip-s-from-access-website-using-modxcloud#dis-post-564168
There was an error with your rewrite rules. Please check the syntax and make sure you've entered them correctly. Errors: nginx: [emerg] duplicate location "/" in 39162.temp.conf:110 nginx: configuration file 39162.temp.conf test failed


I will look into the authorization rewrite. I didn't want to provide a user and password for everyone involved in testing. Will I have to with that method?]]>
smorris Feb 20, 2019, 03:54 PM https://forums.modx.com/thread/104908/how-to-prevent-ip-s-from-access-website-using-modxcloud#dis-post-564168
<![CDATA[Re: How to prevent IP's from access website using ModxCloud?]]> https://forums.modx.com/thread/104908/how-to-prevent-ip-s-from-access-website-using-modxcloud#dis-post-564167 Did you manage that?
So next code doesn't work for you,right?
location / {
    allow 192.168.1.1/24;
    allow 127.0.0.1;
    deny all;
}

If so this is weird and have to be checked. Anyway MODXCloud has good support guys, Jay or someone other will help for sure.

Alternatively I believe you can also try nginx authorization:

location / {
    auth_basic "Restricted";
    auth_basic_user_file /c0xxx/home/.htpasswd;
    try_files $uri $uri/ @modx-rewrite;
}


Here is examples now NGINX can be configured for MODXCLOUD: https://support.modx.com/hc/en-us/articles/217295387-Nginx-Web-Rules-Rewrites
]]>
himurovi4 Feb 20, 2019, 03:49 PM https://forums.modx.com/thread/104908/how-to-prevent-ip-s-from-access-website-using-modxcloud#dis-post-564167