NGINX $request_uri vs $uri

$uri is not equivalent to $request_uri. The $uri variable is set to the URI that nginx is currently processing – but it is also subject to normalisation, including: Removal of the ? and query string Consecutive / characters are replace by a single / URL encoded characters are decoded The value of $request_uri is always … Read more

Why use Mongrel2?

If you could only name one thing then it would be that Mongrel2 is build around ZeroMQ which means that scaling your web server has never been easier. If a request comes in, Mongrel2 receives it (nothing unusual here, same as for NginX and any other httpd). Next thing that happens is that Mongrel2 distributes … Read more

How can I make this try_files directive work?

a very common try_files line which can be applied on your condition is location / { try_files $uri $uri/ /test/index.html; } you probably understand the first part, location / matches all locations, unless it’s matched by a more specific location, like location /test for example The second part ( the try_files ) means when you … Read more

Nginx TCP forwarding based on hostname

This is now possible with the addition of the ngx_stream_ssl_preread module added in Nginx 1.11.5 and the ngx_stream_map module added in 1.11.2. This allows Nginx to read the TLS Client Hello and decide based on the SNI extension which backend to use. stream { map $ssl_preread_server_name $name { vpn1.app.com vpn1_backend; vpn2.app.com vpn2_backend; https.app.com https_backend; default … Read more

nginx add_header not working

There were two issues for me. One is that nginx only processes the last add_header it spots down a tree. So if you have an add_header in the server context, then another in the location nested context, it will only process the add_header directive inside the location context. Only the deepest context. From the NGINX … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)