Use below command to know where is the apache configure file is: then to update the document root:
# apache2ctl -S [On Debian/Ubuntu]
# apachectl -S [On CentOS/RHEL]
OR
# httpd -S
it shows below:
AH00112: Warning: DocumentRoot [/usr/local/opt/httpd24/Users/YOURNAME/SOMESITE] does not exist
AH00112: Warning: DocumentRoot [/usr/local/opt/httpd24/c:/dev/blog] does not exist
VirtualHost configuration:
127.0.0.1:80 blog.localhost (/usr/local/etc/apache2/2.4/extra/httpd-vhosts.conf:29)
172.18.0.4:80 Somesite.localhost (/usr/local/etc/apache2/2.4/extra/httpd-vhosts.conf:24)
ServerRoot: "/usr/local/opt/httpd24"
Main DocumentRoot: "/Users/YOURNAME/Sites"
Main ErrorLog: "/usr/local/var/log/apache2/error_log"
Mutex rewrite-map: using_defaults
Mutex default: dir="/usr/local/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
PidFile: "/usr/local/var/run/apache2/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="YOURNAME" id=501 not_used
Group: name="staff" id=20 not_used
In this case , you will know the warning, then update the Vhost file to delete the Vhosts.
sudo nano /usr/local/etc/apache2/2.4/extra/httpd-vhosts.conf
It works!!!