RewriteEngine On # Allow example.com domain RewriteCond %{HTTP_REFERER} !^https?://(www\.)?example\.com [NC] # Log blocked requests RewriteRule .* - [L,R=403] # Custom log format for blocked requests LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" blocked_requests CustomLog "/path/to/your/logs/blocked_requests.log" blocked_requests
LogFormat "{ \"time\":\"%t\", \"clientip\":\"%a\",\"host\":\"%V\", \"request\":\"%U\", \"query\":\"%q\", \"method\":\"%m\", \"status\":\"%>s\", \"userAgent\":\"%{User-agent}i\", \"referer\":\"%{Referer}i\" }" json_format
# wget https://prdownloads.sourceforge.net/awstats/awstats-7.7.tar.gz https://awstats.sourceforge.io/#DOWNLOAD AWStats - Open Source Log File Analyzer for advanced statistics (GNU GPL) [What is AWStats] [Demo] [Features] [Downloads] [Documentation / FAQ] [Comparison] [AWStats Project/Development] What is AWStats AWStats is a free powerful and featureful tool that generates advanced web, streamin..
일일 트래픽 계산 cat | grep '11/May' | awk '{sum = sum + $10} END {printf ("%f\n", sum/1073741824)}'
ssl인증서를 설치했더라도 http로 접속하면 80으로 접속가능하기때문에 http로 접속하더라도 ssl이 적용된 https로 접속하게 할려면 아래와 같이 apache설정을 해야합니다. Virutalhost설정안에 RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} 설정 후 apache재시작을 해주세요. 주의 : rewrite_module이 설치되어 있는지 꼭 확인하세요.