How toBlockEnter the external IP in the browser address bar to access my website
ringa_lee2019-08-31 10:30:41
There are two ways to implement the WEB server built with apache, both of which are implemented by modifying the httpd.conf file. Here are examples.
Method 1: At the end of the httpd.conf file, add the following code
NameVirtualHost 127.0.0.0 <VirtualHost 127.0.0.0> ServerName 127.0.0.0 <Location /> Order Allow,Deny Deny from all </Location> </VirtualHost>
----------------Separating line----- ------------------
<VirtualHost 127.0.0.0> DocumentRoot "E:/WWW/myweb" ServerName www.php.cn </VirtualHost>
Explanation: The part above the dividing line is to reject any access request directly through the IP 127.0.0.0, �%9