이거 뭐 때문에 나는 걸까요?
nginx 설정 잘못일까요?
2018/09/18 16:51:38 [error] 18534#18534: *3127631 access forbidden by rule, client: ~.~.~.~, server: ~~~.net, request: "GET /b$/.test(f.minlength%7C%7C HTTP/1.1", host: "~~~", referrer: "http://~~~~/common/js/xe.min.js?20180803150221"
관련 설정으로
#css, js 파일 캐쉬를 위해 만기헤더를 사용한다
#클라이언트 캐쉬의 css js 파일은 24시간후에 만기한다
location ~* ^.+\.(css|js|jpg|jpeg|gif|ico|png|bmp|csv|doc|pdf|ppt|pptx|swf|eot|woff|otf|docx|xlsx|xls)$ {
access_log off;
error_log off;
expires 1d;
}
# 접근 금지 파일
location ~* /((config|db\.inc|_head|lib)\.php$|\.(htaccess|htpasswd)$) {
deny all;
}
#prenvent access to hidden files
location ~ /\. {
access_log off;
log_not_found off;
deny all;
}
location = /favicon.ico {
return 204;
access_log off;
log_not_found off;
}
location = /robots.txt {
return 204;
access_log off;
log_not_found off;
}
#특정 에이젼트 차단
if ($http_user_agent ~* (HTTrack|HTMLParser|libwww|LWP::Simple|BBBike|wget)) {
return 403;
}
#특정 파라미터 차단/ PMA 미동작
#if ($args ~* "(_zb_path|g4_path|site_path|skin_site_path)=|GLOBALS(=|\[|\%[0-9A-Z]{0,2})|_REQUEST(=|\[|\%[0-9A-Z]{0,2})|(\<|%3C).*script.*(\>|%3E)|base64_encode.*\(.*\)") {
# return 403;
#}
# GET, HEAD, POST 허용함.
if ($request_method !~ ^(GET|HEAD|POST)$ ) {
return 405;
}
# Block .php file inside upload folder. uploads(wp), files(drupal), data(gnuboard).
location ~ ^/files/(attach|config)/.+\.php$ {
deny all;
}
# Block (log file, binary, certificate, shell script, sql dump file) access.
location ~* \.(log|binary|pem|enc|crt|conf|cnf|sql|sh|key)$ {
deny all;
}
# Block access
location ~* (composer\.json|contributing\.md|license\.txt|readme\.rst|readme\.md|readme\.txt|copyright|artisan|gulpfile\.js|package\.json|phpunit\.xml)$ {
deny all;
}
이거랑 xe rewrite rule
# block direct access to templates, XML schemas, config files, dotfiles, environment info, etc.
location ~ ^/modules/editor/(skins|styles)/.+\.html$ {
# pass
}
location ~ ^/common/manual/.+\.html$ {
# pass
}
location ~ ^/(addons|common/tpl|files/ruleset|(m\.)?layouts|modules|plugins|themes|widgets|widgetstyles)/.+\.(html|xml)$ {
return 403;
}
location ~ ^/files/(attach|config|cache/store)/.+\.php$ {
return 403;
}
location ~ ^/files/(env|member_extra_info/(new_message_flags|point))/ {
return 403;
}
location ~ ^/(\.git|\.ht|\.travis|codeception\.|composer\.|Gruntfile\.js|package\.json|CONTRIBUTING|COPYRIGHT|LICENSE|README) {
return 403;
}
# fix incorrect relative URLs (for legacy support)
location ~ ^/(.+)/(addons|files|layouts|m\.layouts|modules|widgets|widgetstyles)/(.+) {
try_files $uri $uri/ /$2/$3;
}
# fix incorrect minified URLs (for legacy support)
location ~ ^/(.+)\.min\.(css|js)$ {
try_files $uri $uri/ /$1.$2;
}
# rss, blogAPI
rewrite ^/(rss|atom)$ /index.php?module=rss&act=$1 last;
rewrite ^/([a-zA-Z0-9_]+)/(rss|atom|api)$ /index.php?mid=$1&act=$2 last;
# trackback
rewrite ^/([0-9]+)/(.+)/trackback$ /index.php?document_srl=$1&key=$2&act=trackback last;
rewrite ^/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ /index.php?mid=$1&document_srl=$2&key=$3&act=trackback last;
# administrator page
rewrite ^/admin/?$ /index.php?module=admin last;
# document category
rewrite ^/([a-zA-Z0-9_]+)/category/([0-9]+)$ /index.php?mid=$1&category=$2 last;
# document permanent link
rewrite ^/([0-9]+)$ /index.php?document_srl=$1 last;
# mid link
rewrite ^/([a-zA-Z0-9_]+)/?$ /index.php?mid=$1 last;
# mid + document link
rewrite ^/([a-zA-Z0-9_]+)/([0-9]+)$ /index.php?mid=$1&document_srl=$2 last;
# mid + entry title
rewrite ^/([a-zA-Z0-9_]+)/entry/(.+)$ /index.php?mid=$1&entry=$2 last;
~
이 정도인데 뭐가 문제일까요?
xe
GET /b$/.test(f.minlength%7C%7C HTTP/1.1
님 도메인.com/b$/.test(f.minlength%7C%7C라는 주소가 실제로 존재하는 게 아니라면
괴상한 주소에 접속을 시도했다고 막은 것 같습니다. 즉, nginx 에러가 아닙니다.
왜 유저들이 저런 괴상한 주소에 접속을 시도하고 있는지는
사용하시는 레이아웃, 스킨, 애드온 등을 자세히 살펴보아야겠지요.