what I’m attempting to realize on my Debian 9 server utilizing Apache2 is following:
I’ve an online server that has many net pages (positioned in /var/www/html).
I´ve editted apache2.conf in /and so on/apache2 (and restarted apache2 service afterwards)
I´ve added the next directories
<Listing ^/var/www/html$> Choices Indexes FollowSymLinks AllowOverride All Require all granted deny from all enable from some_whitelisted_ip </Listing> <Listing /var/www> Choices Indexes FollowSymLinks AllowOverride All Require all granted enable from all </Listing>
What I’m attempting to say by these guidelines is- is you’re on whitelisted ip and entry the server ip/area (shall we say we’ve got area.com as instance on the server) like www.area.com, you’ll usually see the Apache Index of / web page the place u can see all folders and so on
However For those who method from not whitelisted IP it is best to see Forbidden web page (or else a lot better, be redirected to /var/www/html/not-found/index.html however default Forbidden web page must be okay too).
And the opposite behaviour must be the identical. So if I method area.com/some-page if ought to work usually for each kinds of ip (whitelisted and never whitelisted).
So the change is to disable Index of for non whitelisted IPs.
However when I attempt to attain the area.com, I can see the Index of web page even on not whitelisted IP (when I’m on information, on VPN and so on). What Am I doing mistaken?