Bypass X-Frame-Options with Nginx The X-Frame-Options HTTP response header tells the browser whether a page can be displayed inside <frame>, <iframe>, <embed>, or <object>. Sites can prevent clickjacking by …
Nginx
All posts
Setting up JWT Authentication Nginx 实现 JWT 验证-基于 OpenResty 实现
Nginx SSL/TLS configuration with TLSv1.2 and TLSv1.3 - ECDHE and strong ciphers suite (Openssl 1.1.1) ssl.conf ## # SSL Settings (TLSv1.2 and TLSv1.3) ## ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers …
In 2020, the latest NGINX ngx_http_geoip2 module can precisely block IP access by country or region Install GeoIP2 on CentOS 7 and route requests by IP country in nginx Install geoip2 lib cd /usr/local/src rm …
Nginx HTTPS with Basic Auth reverse proxy for VMware ESXi 6.5 fixed VMRC /screen server { listen 80; server_name esxi.hackion.com; return 301 https://$server_name$request_uri; } server { listen 443 ssl; …
nginx 添加第三方 nginx_upstream_check_module 模块实现健康状态检测 nginx_upstream_check_module Health check HTTP servers inside an upstream nginx.conf http { upstream cluster { # simple round-robin server 192.168.0.1:80; …
How Does Nginx Defend Against DDoS? Nginx limit module for access rate and max concurrent connections (DDoS protection) ngx_http_limit_req_module limit_req_zone $binary_remote_addr zone=mylimit:10m rate=10r/s; …
Use Nginx and mod_pagespeed to Convert Images to WebP on the Fly Compile ngx_pagespeed First make sure Nginx is built with --with-compat, so we do not need to rebuild Nginx from scratch. incubator: …
Force file download with Nginx add_header Content-Disposition 'attachment;'; server { listen 80; server_name my.domain.com; location ~ ^.*/(?P<request_basename>[^/]+\.(mp3))$ { root /path/to/mp3/ add_header …
Do you understand the Nginx request processing flow? 11 processing phases NGX_HTTP_POST_READ_PHASE: A phase after receiving the full HTTP headers. It is before URI rewrite. Very few modules register in this …
Nginx access logs can record millisecond timestamps, but they are milliseconds since EPOCH, for example 1503544071.865. Another variable, $time_local, records a second-level time format, for example …
Fighting DDoS: nginx, iptables, and fail2ban