- Forum
- Main Forum
- English Section
- Server Security
- Reducing Apache Load by Handling Direct IP and Fake PHP Probes with Nginx
×
Presentation and instructions about security tools used to prevent server hacking. Feel free to use them or ask us to protect your site hosting it to a safe, daily monitored vps senter. Freespirits will ensure great quality of services.
Reducing Apache Load by Handling Direct IP and Fake PHP Probes with Nginx
- infogate
-
Συντάκτης θέματος
- Αποσυνδεμένος
- Administrator
-
- Imagination is the beginning of creation
6 Ώρες 49 Λεπτά πριν - 6 Ώρες 45 Λεπτά πριν #349
από infogate
The best possible way to start your online marketing : fspirits.com/go/leadsleap-home
Explode Your Web Site Traffice: fspirits.com/go/sparktraffic
Start your affiliate journey here: fspirits.com/go/olsp-academy
Best Solution To Create Videos: fspirits.com/go/create-studio-pro
Best Solution To Create Graphics: fspirits.com/go/clickdesigns
Smart Chat Automation: fspirits.com/go/chatterpal
Multi-Purpose Video Maker: fspirits.com/go/avatar-builder
Multi-Purpose Video Creator: fspirits.com/go/video-creator
AI Human Spokesperson Videos: fspirits.com/go/humanpal
Reducing Apache Load by Handling Direct IP and Fake PHP Probes with Nginx δημιουργήθηκε από infogate
Hello everyone,I wanted to share a small but useful server hardening improvement that may help others using CWP / Apache / Nginx reverse proxy setups.Recently, I noticed many automated bot requests hitting the server’s default IP page and trying common fake PHP/webshell filenames such as:Apache was blocking many of them, which was good, but the problem was that the requests were still reaching Apache first. On a busy server, this can waste Apache workers and may contribute to errors like:The better approach was to stop these requests earlier at the Nginx level.In my case, the direct IP vhost was controlled by:I added rules inside the existing server block to returnfor fake PHP probes and sensitive hidden files, so they are dropped by Nginx before reaching Apache.Example:After reloading Nginx, tests like these returned an empty reply, which means Nginx blocked them successfully:This is a simple but effective way to reduce useless backend traffic and protect Apache from unnecessary bot noise.Optional extra step: the normal direct IP homepage can also be redirected to the main website by replacing the defaultproxy block with:Of course, always make a backup of the Nginx config file first and test before reloading:This small change helped keep malicious probes away from Apache and made the setup cleaner.Hope this helps someone else running CWP with Nginx + Apache.
wp-curl-file.php, 1337.php, satan.php, .env, and similar suspicious paths.server reached MaxRequestWorkers setting/etc/nginx/conf.d/SERVER-IP.conf444location ~* \.(php|phtml|php5|php7|php8)$ {
return 444;
}
location ~* /\.(env|git|svn|hg|bzr|ht|user\.ini) {
return 444;
}curl -I http://SERVER-IP/wp-curl-file.php
curl -I http://SERVER-IP/.envlocation /location / {
return 301 https://yourdomain.com$request_uri;
}nginx -t
systemctl reload nginxThe best possible way to start your online marketing : fspirits.com/go/leadsleap-home
Explode Your Web Site Traffice: fspirits.com/go/sparktraffic
Start your affiliate journey here: fspirits.com/go/olsp-academy
Best Solution To Create Videos: fspirits.com/go/create-studio-pro
Best Solution To Create Graphics: fspirits.com/go/clickdesigns
Smart Chat Automation: fspirits.com/go/chatterpal
Multi-Purpose Video Maker: fspirits.com/go/avatar-builder
Multi-Purpose Video Creator: fspirits.com/go/video-creator
AI Human Spokesperson Videos: fspirits.com/go/humanpal
Last edit: 6 Ώρες 45 Λεπτά πριν by infogate.
Παρακαλούμε Σύνδεση ή Δημιουργία λογαριασμού για να συμμετάσχετε στη συζήτηση.
- Forum
- Main Forum
- English Section
- Server Security
- Reducing Apache Load by Handling Direct IP and Fake PHP Probes with Nginx
Χρόνος δημιουργίας σελίδας: 0.074 δευτερόλεπτα