Posts

Showing posts with the label nginx

How to protect API endpoints using nginx in a more convenient way

How to protect API endpoints using nginx in a more convenient way. This approach can slightly impact performance, but simplifies configuration and rate limiting.

Magic with nginx geo and autoindex on/off

Image
Long story short: Nginx does not support .htaccess , which can be a problem when you want to restrict autoindex to specific IPs.

Minimalist nginx vhost template example

Minimal Nginx template for HTTPS with HTTP → HTTPS and www → non-www redirects. No need for separate 80 and 443 vhosts if you only use 443 for traffic.

Moving WordPress redirects to nginx

We have pretty cool json from WordPress redirect table and we need move this action to nginx.

Latest Ruby on Debian 8 with Multi‑Site

Setting up a Middleman client API container with Ruby and systemd, plus Nginx configuration for proxying requests.

Mass redirect using Nginx map file

Sometimes after upgrading or migrating an application you still need to keep old links working. A simple way to handle this in Nginx is to use a map file and redirect the requests to their new locations. If you are using HAProxy, you can find a similar example here: Haproxy . This approach is useful when you have many URLs to redirect and don’t want to clutter the main configuration with dozens (or hundreds) of rewrite rules.