Welcome! Log In Create A New Profile

Advanced

Re: map module not working with new 1.1.0

Maxim Dounin
August 09, 2011 09:02PM
Hello!

On Tue, Aug 09, 2011 at 08:35:25PM -0400, Rami Essaid wrote:

> I am so sorry for the false alarm. When testing nginx I reload the config
> using the nginx -s reload command. Because I am using a virtual
> environment my IP address had shift and the config IP mapping was no longer
> accurate but the reload command did not notify me of the conflict. After
> killing nginx and starting it again it gave me the proper error code:
> nginx: [emerg] bind() to 10.2.10.236:80 failed (99: Cannot assign requested
> address)
>
> This is a small thing I guess but it would have been nice when using the
> reload command that it informed me that something was wrong instead of just
> not accepting the changes I made.

On reload nginx doesn't reopen listen sockets as long as they
haven't changed in config, so it will never know your ips are no
longer valid.

If something actually goes wrong during reload - nginx will log
appropriate information to global error before giving up. Note
that it's already running master process which does a reload and
there is no way to log to console ("nginx -s reload" merely sends
SIGHUP to running nginx master process and was introduced mainly
for Windows where one can't do "kill -HUP").

Maxim Dounin

>
> Rami
>
> On Tue, Aug 9, 2011 at 8:22 PM, Maxim Dounin <mdounin@mdounin.ru> wrote:
>
> > Hello!
> >
> > On Tue, Aug 09, 2011 at 07:45:47PM -0400, Rami Essaid wrote:
> >
> > > Hi Guys,
> > >
> > > Has anyone experienced any issues with the map module using the new 1.1.0
> > > compile of nginx? I am mapping user agents and under 1.0.5 everything
> > > worked great, with the new version the exact same config doesnt seem to
> > be
> > > working. I've tried two different maps based on previous comments and
> > > neither seem to work. Anyone else?
> > >
> > >
> > > http {
> > > ....
> > > map $http_user_agent $searchengine {
> > > default 0;
> > > ~(?i)mozilla 1;
> > > ~*mozilla 1;
> > > }
> > > ...
> > > location / {
> > > ....
> > > if ($searchengine){
> > > #return 418;
> > > rewrite ^ /testing/ redirect;
> > > }
> > > ...
> >
> > Works fine here in 1.1.0.
> >
> > Maxim Dounin
> >
> > _______________________________________________
> > nginx mailing list
> > nginx@nginx.org
> > http://mailman.nginx.org/mailman/listinfo/nginx
> >
>
>
>
> --
> Cheers,
> Rami

> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

map module not working with new 1.1.0

ressaid August 09, 2011 07:46PM

Re: map module not working with new 1.1.0

Maxim Dounin August 09, 2011 08:24PM

Re: map module not working with new 1.1.0

ressaid August 09, 2011 08:36PM

Re: map module not working with new 1.1.0

Maxim Dounin August 09, 2011 09:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 54
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready