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