Chuyển tới nội dung chính
kitlocal.dev

Bảng tra cứu nhanh NGINX

Chạy cục bộ

Xử lý 100% ngay trong trình duyệt. Dữ liệu đầu vào và kết quả không rời khỏi thiết bị.

Cấu hình và vận hành NGINX: server block, reverse proxy, WebSocket, TLS/SSL, bộ nhớ đệm, nén phản hồi và giới hạn tốc độ truy cập.

Cách hoạt động

NGINX resolves `server { listen; server_name; }` first, then picks the most specific `location` block, forwarding or serving static files; always validate with `nginx -t` before `reload`.

Bộ lệnh sống còn

Vài lệnh nên học trước tiên.

40 lệnh

Phím tắt/Tìm kiếmJKDi chuyển mục chọnCSao chép lệnh đang chọnFĐánh dấu mục đang chọnEscXoá tìm kiếm

CLI Check, Reload & Logs

Validate syntax, reload without dropping connections, and inspect runtime config.

  • Cơ bản

    Test all included nginx configuration files for syntax and path errors

    nginx -t

    Khi nào dùng

    Never reload NGINX without testing first; broken config aborts reload safely only if checked.

    Giải thích từng phần

    -t
    Parse config and test validity without applying

    Ví dụ

    sudo nginx -t

    Kết quả

    nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
    nginx: configuration file /etc/nginx/nginx.conf test is successful

Server Blocks, Locations & Static Files

Understand location matching precedence, SPA fallbacks, and clean redirects.

Reverse Proxy, Upstreams & WebSockets

Forward client IPs, HTTP/1.1 keepalives, WebSocket upgrades, and timeouts.

TLS, Security Headers & Rate Limits

Enforce HTTPS, TLS 1.2/1.3, security headers, and per-IP rate/size caps.

Compression, Caching & Tuning

Enable gzip, cache-control headers, worker limits, and proxy microcaching.

Dùng thử trong công cụ KitLocal

Kiểm tra ngày 15 thg 11, 2026 · Đối chiếu với NGINX 1.26+ / mainline

Nguồn: NGINX Documentation · NGINX ngx_http_proxy_module

Hãy thay phần trong dấu ngoặc nhọn bằng giá trị của bạn. Lệnh lấy từ tài liệu chính thức, ví dụ đã được chạy thử trên phiên bản được ghi.