error_page
Witold Filipczyk
witekfl001 at gmail.com
Wed Oct 20 21:55:33 MSD 2010
On Wed, Oct 20, 2010 at 09:37:10PM +0400, Igor Sysoev wrote:
> On Wed, Oct 20, 2010 at 07:26:00PM +0200, Witold Filipczyk wrote:
>
> > > With this configuration
> > >
> > > error_page 404 /404.html;
> > > locaiton = /404.html {
> > > root /path/to/page;
> > > }
> > >
> > > you will get 404 code with /404.html body for this request:
> > > http://blabla1.com/non-existant.html
> > >
> > > and 200 code with /404.html body for this request:
> > > http://blabla1.com/404.html
> >
> > There is:
> > server {
> > server_name _;
> > error_page 404 /404.html;
> > location = /404.html {
> > root /blabla;
> > }
> > }
> >
> > blabla1.com goes into _;
>
> And where is question ?
This was the answer for the question where is the problem.
Then, once again.
There is:
server {
server_name _;
error_page 404 /404.html;
location = /404.html {
root /blabla;
}
# here goes handling of 1000 virtual hosts
}
Say, blabla1.com and blabla2.com are such hosts. There is the blabla1.com/404.html and the blabla2.com/404.html
which are different than /blabla/404.html. In this setup blabla1.com/404.html is unaccessible.
Nevermind.
I've got the answer.
More information about the nginx-devel
mailing list