打开FinderShift⇧-Command⌘-G:打开“前往文件夹”窗口。

输入/Library/WebServer/Documents前往Apache服务器的文件目录

为方便使用可将文件软连接到该目录,如:
ln -s ~/Apache/index.html /Library/WebServer/Documents/

打开Terminal,使用以下命令控制服务的开关

sudo apachectl start #开启apache
sudo apachectl restart #重启apache
sudo apachectl stop #关闭apache

作者 Assaultcore

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注