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
Complementary filter and relative orientation with MPU6050
The MPU-60X0 is the world's first integrated 6-axis MotionTracking device that combines a 3-axis gyroscope, 3-axis accelerometer and a Digital Motion Processor (DMP) all in a small package. It helps to measure velocity, orientation, acceleration, displacement and other motion like features
The MPU-6050 features three 16-bit analog-to-digital converters (ADCs) for digitizing the gyroscope outputs and three 16-bit ADCs for digitizing the accelerometer outputs. For precision tracking of both fast and slow motions, the parts feature a user-programmable gyroscope full-scale range and a user-programmable accelerometer full-scale range.
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.
Premium articles
How to create a Composer package from scratch
A helper class, a small client wrapper or a set of validation rules often starts in one project and ends up copied into the next one. From that point the copies drift apart, a bug fixed in one of them stays open in the rest, and there is no version number to refer to when something changes.
Turning that code into a Composer package removes the copies. The requirements are modest, since a package is a directory containing a valid composer.json file, a Git repository hosting it, and a listing on Packagist that tells Composer where to find it.
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.
Recent articles
How to create a Composer package from scratch
A helper class, a small client wrapper or a set of validation rules often starts in one project and ends up copied into the next one. From that point the copies drift apart, a bug fixed in one of them stays open in the rest, and there is no version number to refer to when something changes.
Turning that code into a Composer package removes the copies. The requirements are modest, since a package is a directory containing a valid composer.json file, a Git repository hosting it, and a listing on Packagist that tells Composer where to find it.
Getting started with the HC-06 Bluetooth module
Adding wireless communication to an Arduino project usually starts with a Bluetooth serial module, and the HC-06 is one of the most common choices. It's cheap, widely available, and does one job well: it lets a phone or computer connect to your board and exchange data as if the two were joined by a cable. Four pins, one operating mode, and a small set of configuration commands is the whole picture. That simplicity comes with a real constraint though, and knowing it upfront saves time later, since the HC-06 only accepts incoming connections and can't reach out to another device on its own.
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.