Nginx 특정 IP 막기

2025. 2. 1. 18:31Web Server/nginx

error.log에 이상한 접속이 있어서 해당 IP의 접근 차단

server {
    listen 80;
    server_name {도메인};

    # Deny access for the specific IP address
    deny {ip};
    allow all;

    # Other configuration settings
    root {디렉토리};
    index index.html index.htm;

    # ... additional configuration ...
}