Thank you for the clarification. 2017-02-10 20:45 GMT+08:00 Maxim Dounin <mdou...@mdounin.ru>:
> Hello! > > On Fri, Feb 10, 2017 at 01:31:34PM +0800, linbo liao wrote: > > > I setup an test Nginx 1.10.3 on local VM (Centos 6.7 x86_64). I configure > > the following location > > > > location =/404.html { > > root /usr/share/nginx/html; > > } > > > > As my understanding, it is not an valid url, but `nginx -t` pass the > > configuration test. > > > > Is it a bug ? > > In this particular case the location is interpreted as "/404.html" > with "=" modifier (see http://nginx.org/r/location). That is, it > matches requests to "/404.html" exactly. Space between "=" and > "/404.html" can be omitted, and nginx is smart enough to recognize > this. > > On the other hand, there are no limitations on locations to > configure in nginx.conf. You can configure anything you like, > even locations which can't match real URIs. Moreover, such > locations can used for artificial processing with rewrites, and > I've seen such configs in practice. This is not something I can > recommend though. > > -- > Maxim Dounin > http://nginx.org/ > _______________________________________________ > 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