MAC start apache service

Recently, I need to play a simple local service. The Apache service comes with the mac, which can be started directly through the command, and then you can see it works by visiting 127.0.0.1.

start the apache service

sudo apachectl start

stop apache service

sudo apachectl stop

The directory where Apache configures httpd.conf

Direct command to open or shift + command + G to go, you can configure various configuration items such as port, DocumentRoot, etc.

/private/etc/apache2/httpd.conf

Apache deploys web projects

Copy the project directly to the directory

/Library/WebServer/Documents/

Either
write picture description here

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326611452&siteId=291194637