Nginx
-
Configuring Logstash on Droplets to Forward Nginx Logs to Managed OpenSearch
Introduction Keeping track of web server logs is essential for running your website smoothly, solving problems, and understanding user behavior. If you’re using Nginx, it produces access and error logs full of valuable information. To manage and analyze these logs, you can use Logstash to process and forward them and DigitalOcean’s Managed OpenSearch to index and visualize the data. In this tutorial, we will walk you through installing Logstash on a Droplet, setting it up to collect your Nginx logs,…
-
Introduction to Web Servers
Introduction A web server’s primary role is to serve web pages for a website. A web page can be rendered from a single HTML file, or a complex assortment of resources fitted together. If you want to host your web application on the internet, in many cases you will need a web server. One of the most common use cases for web servers is serving files necessary for rendering a website in a browser. When you visit http://www.digitalocean.com, you begin…
-
How To Create Temporary and Permanent Redirects with Nginx
Introduction HTTP redirection is way to point one domain or address to another. There are a few different kinds of redirects, each of which mean something different to the client browser. The two most common types are temporary redirects and permanent redirects. Temporary redirects (response status code 302 Found) are useful if a URL temporarily needs to be served from a different location. For example, if you are performing site maintenance, you may wish to use a temporary redirect from…
-
How To Configure Nginx with SSL as a Reverse Proxy for Jenkins
Introduction By default, Jenkins comes with its own built in web server, which listens on port 8080. This is convenient if you run a private Jenkins instance, or if you just need to get something up quickly and don’t care about security. Once you have real production data going to your host, though, it’s a good idea to use a more secure web server such as Nginx handling the traffic. This post will detail how to wrap your site with…
-
Introduction to Web Servers
Introduction A web server’s primary role is to serve web pages for a website. A web page can be rendered from a single HTML file, or a complex assortment of resources fitted together. If you want to host your web application on the internet, in many cases you will need a web server. One of the most common use cases for web servers is serving files necessary for rendering a website in a browser. When you visit http://www.digitalocean.com, you begin…
-
How To Set Up Nginx with HTTP/2 Support on Ubuntu 22.04
A previous version of this tutorial was written by Sergey Zhukaev. Introduction Nginx is a fast and reliable open-source web server. It gained its popularity due to its low memory footprint, high scalability, ease of configuration, and support for a wide variety of protocols. HTTP/2 is a newer version of the Hypertext Transport Protocol, which is used on the Web to deliver pages from server to browser. HTTP/2 is the first major update of HTTP in almost two decades: HTTP1.1…
-
How To Move an Nginx Web Root to a New Location on Ubuntu 22.04
Introduction On Ubuntu, the Nginx web server stores its documents in /var/www/html, which is typically located on the root filesystem with the rest of the operating system. Sometimes, though, it’s helpful to move the document root to another location, such as a separate mounted filesystem. For example, if you serve multiple websites from the same Nginx instance, putting each site’s document root on its own volume allows you to scale in response to the needs of a specific site or…
-
How To Deploy Load-Balanced Web Applications on DigitalOcean with CDK for Terraform and TypeScript
The author selected the Wikimedia Foundation to receive a donation as part of the Write for DOnations program. Introduction Infrastructure as Code (IaC) is a practice of automating infrastructure deployment and modifications by defining the resource states and their relationships in code. Executing that code then creates or modifies the actual resources in the cloud. IaC allows engineers to use an IaC tool like Terraform (by HashiCorp) for provisioning infrastructure. With IaC, changes to your infrastructure can go through the…
-
How to Install Nginx on Debian 10
Introduction Nginx is a free and open-source web server used to host websites and applications of all sizes. The software is known for its low impact on memory resources, high scalability, and its modular, event-driven architecture which can offer secure, predictable performance. More than just a web server, Nginx also works as a load balancer, an HTTP cache, and a reverse proxy. In this guide, you will install Nginx on your Debian 10 server. Prerequisites Before you begin this guide,…