Custom Error pages

2017-03-23 Thread Alex Samad
Hi 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; internal; allow all; } and the lua file has ngx.say( "Your source ip address

回复:Nginx-lua Dynamic location to upstream

2017-03-23 Thread tjlp
You can refer to the open source Openresty. - 原始邮件 - 发件人:"nembo" 收件人:nginx@nginx.org 主题:Nginx-lua Dynamic location to upstream 日期:2017年03月23日 18点24分 Hi there, I've Just started to play with Lua (with nginx-plus) and this is what I'd like to achieve: I expose a location and a lua script W

302 301 redirect custom HTML content

2017-03-23 Thread Eugene Piatenko
Hello! I'm trying to 1. send people to home page if they enter wrong place (404) 2. it works, but HTML content with headers is: HTTP/1.1 302 Moved Temporarily Server: nginx/1.10.3 Date: Thu, 23 Mar 2017 11:38:08 GMT Content-Type: text/html Content-Length: 161 Location: http://mysite/myhomepage.ht

Nginx-lua Dynamic location to upstream

2017-03-23 Thread nembo
Hi there, I've Just started to play with Lua (with nginx-plus) and this is what I'd like to achieve: I expose a location and a lua script Will inspect http args.Once It takes the args,It Will call an external api searching for a specific content and It Will writes the returned json values on some l

Re: fastcgi_pass and http upstream

2017-03-23 Thread Vucomir Ianculov via nginx
HI Yuriy, can you please give me an example of the vhost configuration for this situation? Thanks. - Original Message - From: "Yuriy Medvedev" To: nginx@nginx.org Cc: "Vucomir Ianculov" Sent: Wednesday, March 22, 2017 9:57:40 PM Subject: Re: fastcgi_pass and http upstream Ye