Nginx logically divides the configurations in order to serve different content into blocks. A server block is a subset of Nginx’s configuration that defines a virtual server used to handle requests of a defined type. Administrators often configure multiple server blocks and decide which block should handle which connection based on the requested domain name, port and IP address.
Trending Now
Google OAuth 2.0 access for server side web apps
Google is a popular platform that is commonly used on websites as registration or login option. It allows us to register with our Google account with just a few clicks and skip the process of email validation. It saves us a lot of time and makes the life easier as we don't need to remember all those credentials for different websites anymore.
Image optimization for the web
Images are almost always the heaviest thing on a web page. A single hero photo can weigh more than all the HTML, CSS and JavaScript of a site put together, and every extra kilobyte delays the moment a visitor finally sees something useful. Search engines notice it, and users on mobile data notice it faster. The encouraging part is that image delivery is one of the few areas where the fixes are well documented, mostly automatable, and visible in the metrics almost immediately.
Premium articles
On-the-fly image resizing with Nginx
If you've ever managed a web server that serves images to thousands of users, you've probably run into the problem of serving the right image size to the right context. A 1200x800 hero image looks great on a desktop, but it's pure waste on a mobile screen or a thumbnail grid. The traditional answer to this has been generating multiple image variants at upload time, but that approach gets messy fast. A cleaner and more flexible solution is to resize images directly at the server level, on demand, using nothing more than nginx and its built-in image filter module. This guide walks you through setting that up from scratch, including caching so your server isn't processing the same image twice.
Tag-based cache inside Laravel repositories
Working with cache can drastically improve the performance of an application, especially when dealing with data that doesn't change too often. While Laravel provides solid support for caching through multiple drivers, it doesn't offer native support for cache tags. To work around this limitation, we'll integrate Symfony's Cache component, which brings tag support and fits well into the repository pattern we've already established. In this article, we'll build on the existing structure and focus on using cache tags to group and clear related data more efficiently.
ESP8266 Firmware update
The ESP8266 is a popular Wi-Fi module used in many IoT projects. Keeping its firmware up-to-date ensures you have the latest features, security patches, and bug fixes. Updating the firmware might seem difficult, but it's quite straightforward once you understand the steps involved. In this article, we'll explore how to update the firmware of the ESP8266 module, a crucial task for maintaining optimal performance and security. This update process can be carried out either locally, using a USB connection, or remotely via cloud. We'll examine both methods to provide a comprehensive understanding of how to keep your ESP8266 up-to-date with the latest firmware version.
Recent articles
Image optimization for the web
Images are almost always the heaviest thing on a web page. A single hero photo can weigh more than all the HTML, CSS and JavaScript of a site put together, and every extra kilobyte delays the moment a visitor finally sees something useful. Search engines notice it, and users on mobile data notice it faster. The encouraging part is that image delivery is one of the few areas where the fixes are well documented, mostly automatable, and visible in the metrics almost immediately.
SEO guidelines every website should follow
Search engine optimization has a reputation for being complicated, but a big part of it comes down to fundamentals. Search engines crawl millions of pages every day and reward the ones that are well structured, fast and easy to understand. The surprising part is how many websites, including professionally built ones, still fail at the basics and quietly lose positions in search results because of it.
Serial communication between two Arduino boards
Getting two Arduino boards to talk to each other opens up projects that a single board can't handle on its own. You might have one board reading sensors in one corner of a room and another driving a display somewhere else, and the two need to share what they know. Serial communication is one of the simplest ways to make that happen, and it works with almost any Arduino model you have lying around. This article walks through connecting two Arduino Nano boards and passing data back and forth over their serial ports.