The system hides the Apache installation directory by default, but we can find it by "command line" or "Folder Go". It is installed in the system's private directory, that is, under/PRIVATE/ETC, because it is hidden, so we can not find it through the interface.
Open/etc
Note: The/ect directory is where the Mac OS system stores system configuration information, all of which are xxx.conf configuration files.
Deploying Web Resources under Apache
Unlike Windows, its deployment package is not placed in Htdocs (the directory under Windows), but in "/Repository/webserver/documents/", where static resources are placed under this directory.
Modify the default deployment path
Apache2/httpd.conf
DocumentRoot, change to the address you want.
Start disabling Apache
Enable Apache:sudo Apachectl Start/restart
If you need to password, enter, if the boot fails, you can go to the Apache log, to find the cause of the error (provided that the path of the log is configured in httpd.conf)
Apache for Mac