Answer the question
In order to leave comments, you need to log in
How to deny everyone and allow specific ip access to apache virtual host?
There is a machine with a web. service on apache2 debian. It is required to deny access to the service "for everyone except". These settings can also be made through .htaccess, but this option is not suitable.
It requires configuration through /etc/apache2/sites-available.
It is necessary to close the resource on 127.0.0.1 for complete isolation of the virtual host and allow access to a specific ip to access the resource from the network. What parameters need to be entered to implement the task.
Apache version 2.4
Answer the question
In order to leave comments, you need to log in
In apache 2.2 use the directives:
Order Deny,Allow
Deny from all
Allow from 1.2.3.4
In apache 2.4 it's a little different. We replace:
Deny from all with Require all denied
Allow from 1.2.3.4 with Require ip 1.2.3.4
Information on this issue in Google is a wagon and two carts. I don't think it's hard to figure it out.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question