MAC开启http服务

MAC开启本地http服务很简单。

只需要一行代码打开apachectl。

打开MAC终端

开启apachectl:

 sudo apachectl start  

重启apachectl:

sudo apachectl restart  

关闭apachectl:

sudo apachectl stop  

服务器根目录在:

/Library/WebServer/Documents

打开finder前往文件夹复制粘贴就行了,然后就可以访问到http上的文件了。

猜你喜欢

转载自blog.csdn.net/iov3Rain/article/details/93513310