-
切换到root用户 sudo -i
-
apache
shift+command+G 输入目录 /private/etc/apache2/
/* 启动 Apache 服务 */
sudo apachectl start
/* 重启 Apache 服务 */
sudo apachectl restart
/* 停止 Apache 服务 */
sudo apachectl stop
/* 查看 Apache 版本 */
httpd -v复制代码
配置文件的目录:
/private/etc/apache2/httpd.conf
- 监听8080端口
sudo lsof -iTCP:80 -sTCP:LISTEN
开启
sudo /usr/sbin/httpd -k start
-
PHP
配置文件目录:
The