macOS Apache

本文最后更新于:2024年9月8日 晚上

macOS Apache

Apache 文件默认位置

  • Mac OS 的 Apache2 的配置文件(httpd.config):
1
/etc/apache2
  • Mac OS 的 Apache2 的程序文件(httpd, ab):
1
/usr/sbin/
  • Mac OS 的 Apache2 的默认根目录:
1
/Library/WebServer/Documents

Apache命令

1
2
3
4
5
6
7
8
9
10
11
// 启动服务器。
sudo apachectl -k start
sudo apachectl start

// 关闭服务器。
sudo apachectl -k stop
sudo apachectl stop

// 重启服务器。
sudo apachectl -k restart
sudo apachectl restart

关闭apache随系统启动

1
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!