Welcome! Log In Create A New Profile


Custom Error pages

March 24, 2017 01:56AM

I got something like this

error_page 404 /stderror404.html;

location = /stderror400.html {
root /var/www/error;
content_by_lua_file /var/www/error/stderror400.lua;

allow all;

and the lua file has

ngx.say( "Your source ip address is: " .. ngx.var.remote_addr .. ":" ..
ngx.var.remote_port .. "<br>");
ngx.say( "You requested URI: " .. ngx.var.uri .. "<br>");


Seems like I have to do a restart to get the lua file reread if I have
changed it ... reload doesn't seem to cut it. is there some signal i can
send to reread the lua file.

ngx.var.uri is always /stderror404.html how can I capture the original uri
and print it here ?
nginx mailing list
Subject Author Posted

Custom Error pages

alexsamad March 24, 2017 01:56AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 96
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