Dear millis,
I have set like this
error_page 403 /error-page/403.html;
however when I open http://mydomain.com/error-page/ is still giving me
forbidden msg default by nginx.
This’s shown on my error log
2010/05/12 12:19:31 [error] 14785#0: *727087 directory index of
“/home/mysite/error-page/” is forbidden, client: 1.2.1.4, server:
www.mydomain.com, request: “GET /error-page/ HTTP/1.0”, host:
“www.mydomain.com”
On Wed, May 12, 2010 at 12:25:55PM +0700, Glen L. wrote:
however when I open http://mydomain.com/error-page/ is still giving me
forbidden msg default by nginx.
This’s shown on my error log
2010/05/12 12:19:31 [error] 14785#0: *727087 directory index of
“/home/mysite/error-page/” is forbidden, client: 1.2.1.4, server:
www.mydomain.com, request: “GET /error-page/ HTTP/1.0”, host:
“www.mydomain.com”
Where is this “error_page …”: on server or location level ?
–
Igor S.
http://sysoev.ru/en/
server {
listen 80;
index index.php index.html;
root /home/mysite;
error_page 403 /error-page/403.html;
error_page 404 /error-page/404.html;
location / {
…
}
}
On Wed, May 12, 2010 at 01:53:41PM +0700, Glen L. wrote:
}
}
In my test this works as expoected.
What is in “location /” ?
nginx mailing list
[email protected]
nginx Info Page
–
Igor S.
http://sysoev.ru/en/
On Wed, May 12, 2010 at 02:11:32PM +0700, Glen L. wrote:
location / {
expires 60;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://lb;
}
Which is http://lb is forwarded to my fastcgi daemon
So I do not understand why does nginx handle “/error-page/” as
a static request. It should be proxied to lb. Do you have
location /error-page/ {
}
?
index index.php index.html;
In my test this works as expoected.
Dear millis,
forbidden msg default by nginx.
Where is this “error_page …”: on server or location level ?
nginx mailing list
[email protected]
nginx Info Page
nginx mailing list
[email protected]
nginx Info Page
–
Igor S.
http://sysoev.ru/en/
No it doesn’t have location /error-page/ tag
location / {
expires 60;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_pass http://lb;
}
Which is http://lb is forwarded to my fastcgi daemon
On Wed, May 12, 2010 at 02:22:06PM +0700, Glen L. wrote:
No it doesn’t have location /error-page/ tag
Could you create a debug log of the request ?
proxy_set_header Host $host;
a static request. It should be proxied to lb. Do you have
Subject: Re: error_page
Sent: 12 Mei 2010 13:45
Igor Sysoev
nginx Info Page
nginx mailing list
[email protected]
nginx Info Page
nginx mailing list
[email protected]
nginx Info Page
–
Igor S.
http://sysoev.ru/en/