nginx: [warn] low address bits of 138.68.249.0/22 are meaningless in /etc/nginx/snippets/deny-ds.conf:262
nginx: [warn] low address bits of 83.171.241.0/22 are meaningless in /etc/nginx/snippets/deny-ds.conf:12813
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 104.16.0.0/12;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 131.0.72.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 172.64.0.0/13;
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 197.234.240.0/22;
set_real_ip_from 198.41.128.0/17;
set_real_ip_from 2400:cb00::/32;
set_real_ip_from 2606:4700::/32;
set_real_ip_from 2803:f800::/32;
set_real_ip_from 2405:b500::/32;
set_real_ip_from 2405:8100::/32;
set_real_ip_from 2c0f:f248::/32;
set_real_ip_from 2a06:98c0::/29;
real_ip_header CF-Connecting-IP;
if ($http_user_agent ~* Dataprovider|babbar.tech|msnbot|scrapbot|SemrushBot|MJ12bot|AhrefsBot|bingbot|DotBot|LinkpadBot|SputnikBot|statdom.ru|MegaIndex.ru|WebDataStats|Jooblebot|Baiduspider|BackupLand|NetcraftSurveyAgent|openstat.ru|Ahrefs|SputnikBot|spbot|DigExt|Sogou|MJ12|majestic12|80legs|SISTRIX|Semrush|Crowsnest|CCBot|TalkTalk|PaperLiBot|peerindex|ia_archiver|Slurp|Aport|NING|JS-Kit|rogerbot|BLEXBot|MJ12bot|Twiceler|Baiduspider|Java|CommentReader|Yeti|discobot|BTWebClient|Tagoobot|Ezooms|igdeSpyder|AhrefsBot|Teleport|Offline|DISCo|netvampire|Copier|HTTrack|WebCopier|WebCollector) {
return 444;
}
gzip on;
gzip_comp_level 8;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
}
ssl_certificate /var/ssl/certs/nginx-selfsigned.crt;
ssl_certificate_key /var/ssl/private/nginx-selfsigned.key;
ssl_dhparam /var/ssl/certs/dhparam.pem;
server {
server_name site.ru;
listen 443 ssl;
root /var/www/web;
index index.php;
include /etc/nginx/snippets/bots.conf;
include /etc/nginx/snippets/deny-ips.conf;
include /etc/nginx/snippets/deny-ds.conf;
include /etc/nginx/snippets/ssl-selfsigned.conf;
include /etc/nginx/snippets/php-fpm.conf;
include /etc/nginx/snippets/gzip.conf;
access_log /var/log/nginx/access.ru.log;
error_log /var/log/nginx/error.log error;
proxy_buffering off;
proxy_buffers 16 16k;
proxy_buffer_size 32k;
fastcgi_buffer_size 32k;
fastcgi_buffers 16 12k;
location / {
if ($host !~ ^(site.ru)$ ) {
return 444;
}
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php last;
}
}
location /user/ {
return 404;
}
if ($http_user_agent ~* LWP::Simple|BBBike|wget) {
return 403;
}
location ~* (\.inc\.php|\.tpl|\.ht|\.tpl\.php|\.auto\.php)$ {
deny all;
}
}