February 2018
Beginner to intermediate
348 pages
9h 40m
English
There are many ways by which you can restrict Apache to only accept local requests and deny access to the outside world. But first, why would you want to do that? As an extra layer positioned between the client and Apache, Nginx provides a certain comfort in terms of security. Visitors no longer have direct access to Apache, which decreases the potential risk—no one would be able to exploit possible new vulnerabilities. Generally speaking, the principle of least privilege should apply.
The first method consists of changing the listening network interface in the main configuration file. The Listen directive of Apache lets you specify a port, but also an IP address. However, by default, no IP address is selected, ...