Nginx Proxy

Restrict access to NGINX by country with GeoIP2

Country-based access restrictions can reduce the exposure of an Internet-facing service when its legitimate users connect from a specific region. This guide configures NGINX to allow connections geolocated in Spain while keeping access available from the local network and private VPN ranges. IP geolocation is approximate. It can misclassify mobile carrier, VPN, or ISP addresses, so use it as an additional filtering layer rather than a replacement for authentication or other security measures. ...

November 30, 2026 · 5 min · Yvoictra
Generate static web with Hugo and NGINX

Generate a static website with Hugo and NGINX

Introduction During the last few years, I have started several blogs (not much success, it must be said). A technology one, my photography web, and a blog with personal matters, which I decided to close. All of them were made with the same CMS platform: WordPress. WordPress has some advantages, such as its ease of use or the great community behind it. However, I was tired of the huge amount of resources I needed to deploy the CMS and give a good experience to the readers of my blog. It is needed to install a MySQL database, deploy PHP on the server, and install several plugins on WordPress to optimize the experience. ...

August 13, 2023 · 6 min · Yvoictra

Solve issue "client intended to send too large body" in NGINX

I have faced an issue in a web server using NGINX while trying to upload a file using wordpress. In the nginx error log I saw the error “Client intended to send too large body” in this entry: $ tail -f /var/log/nginx/*error*.log 2020/09/01 14:31:04 [error] 884#884: *126565 client intended to send too large body: 1195619 bytes, client: 55.173.250.46, server: test.com, request: "POST /wp-json/wp/v2/media?_locale=user HTTP/2.0", host: "test.com", referrer: "https://test.com/wp-admin/post.php?post=2460&action=edit" This limitation is defined in the NGINX web server, so I have to changed the configuration of the server: ...

September 1, 2020 · 1 min · Yvoictra