Apache sets the default virtual host
Default virtual host
To prevent other domain names that are not our own from being resolved to our own IP, we can restrict other domain names by changing the virtual host file / usr/local/apache2/conf/extra/httpd-vhosts.con. We created a new virtual host and created a new empty directory with its permissions set to 600. In this way, only the domain name we defined in the configuration file can be accessed.
The command is as follows:
Vim / usr/local/apache2/conf/extra/httpd-vhosts.conf
Add the following code to the location of the first virtual host:
DocumentRoot "/ tmp/123"
ServerName 1111.com
Save exit
Mkdir / tmp/123
Chmod 600 / tmp/123
Apachectl-t
Apachectl restart