Let’s say you need to configure mTLS for communication between two servers, for example, for requests from a website to an API server.
Continue reading “How to set up mTLS”Category Archives: Nginx
Configuring Cloudflare’s CF-Connecting-IP Header
Since when Cloudflare proxy is enabled, requests to the web server will come from Cloudflare servers, and not directly from users, you need to configure the CF-Connecting-IP header, which transmits the user’s real IP address. After configuration, it will be displayed as before in logs and requests.
Continue reading “Configuring Cloudflare’s CF-Connecting-IP Header”How to configure HSTS in Nginx
HSTS (HTTP Strict Transport Security) is a response header that tells the browser that the site should only be opened via HTTPS.
Continue reading “How to configure HSTS in Nginx”How to Enable IPv6 in Nginx
I’ll show you how to quickly and easily enable IPv6 support in Nginx.
Continue reading “How to Enable IPv6 in Nginx”Nginx. Using the map module
Once I needed to additionally keep a log of 404 requests in a separate file, with subsequent export via rsyslog to a mysql database and processing by scripts.
Continue reading “Nginx. Using the map module”Solution “111 Connection refused while connecting to upstream”
Once I noticed an error in the /var/log/nginx/error.log:
Continue reading “Solution “111 Connection refused while connecting to upstream””Nginx. Directory Access Restriction
In this article I will give examples of restricting access to files or directories by IP address or username and password.
Continue reading “Nginx. Directory Access Restriction”Configuring SSL in Nginx
Let’s say Nginx is installed, the site opens via http, and we want it to open via https.
Continue reading “Configuring SSL in Nginx”How to disable TLS 1.0 and TLS 1.1 in Nginx
The TLS 1.0 protocol appeared in 1999, TLS 1.1 in 2006, and they will both be considered obsolete in 2020, and will also have to be removed from support in various browsers around March 2020, so you need to disable them. Similarly, SSL 2.0, SSL 3.0 protocols were previously outdated.
Continue reading “How to disable TLS 1.0 and TLS 1.1 in Nginx”Nginx. Parameter default_server
The default_server parameter defines the default server to which a client request will be sent in which the host field is empty or an unknown domain is specified in it. For example, when a client opens the server IP address in a browser, or when the server has several domains, for example, ixnfo.com, test1.ixnfo.com, test2.ixnfo.com, but not all domains are specified in the ngixn configuration.
Continue reading “Nginx. Parameter default_server”