Apache HTTP Server 使用

安装

macOS:

brew install apache2

Ubuntu:

sudo apt install apache2

使用

配置文件路径:

  • macOS: /opt/homebrew/etc/httpd/httpd.conf
  • Ubuntu: /etc/apache2/apache2.conf

DocumentRoot:

  • macOS: /opt/homebrew/var/www
  • Ubuntu: /var/www

启动

macOS:

brew services start httpd

Ubuntu:

sudo systemctl start apache2

操作

apachectl

参见:Apache HTTP Server Documentation

posted @ 2024-07-05 12:05  Undefined443  阅读(2)  评论(0编辑  收藏  举报