Welcome! Log In Create A New Profile

Advanced

Nginx maintenance page/redirect with ip exception

March 30, 2013 10:45AM
Coming fra Apache/htaccess, im trying to get my head around the Nginx paradigme. Im trying to achieve a temporary redirect to a www.mysite.com/maintenance.html page, for all visitors to www.mysite.com except visitors coming from IP:xx.xx.xx.xx.wich should have fuul access to the site.

I know how to achieve this with htaccess, but this doesnt applya to Nginx. I have tried different suggestions on modding nginx.conf, default.conf and mysite.cong file. I using virtual host and my site conf is placed in: /etc/nginx/sites-available/

Any simple solution to redirect all visitors except visitors defined by IP?
SubjectAuthorPosted

Nginx maintenance page/redirect with ip exception

cavamondoMarch 30, 2013 10:45AM

Re: Nginx maintenance page/redirect with ip exception

cavamondoMarch 31, 2013 06:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 114
Record Number of Users: 4 on November 24, 2014
Record Number of Guests: 377 on November 23, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready