mac 搭建Apache服务器

作者: 吾有佳人 | 来源:发表于2017-06-09 11:19 被阅读39次

1.mac10.11已经自带安装了apache服务器

打开终端 输入 

sudo apachectl start (这个是启动服务器)

sudo apachectl restart (这是重启服务器)

停止 Apache:sudo apachectl stop

重启 Apache:sudo apachectl restart

这时在你的浏览器上输入:http://localhost,或者http://127.0.0.1,itworks!*


Apache服务器默认的web根目录在:/Library/WebServer/Documents

Apache的配置文件在:/etc/apache2

可以添加一个HTML 到/Library/WebServer/Documents目录下

查看本机IP  

在浏览器中输入这种格式 :本机IP/静态网页, 以我的为例:http://10.21.48.32/test2.html,

相关文章

网友评论

    本文标题:mac 搭建Apache服务器

    本文链接:https://www.haomeiwen.com/subject/rnvalttx.html