(Mac)PHP 学习笔记一 Apache
2018-09-04 本文已影响4人
887d1fc86fe6
开启Apache: sudo apachectl start
重启Apache: sudo apachectl restart
关闭Apache: sudo apachectl stop
Apache本地路径:/Library/WebServer/Documents
Apache中 httpd.conf 路径: /etc/apache2/httpd.conf
// Mac中没有默认的 php.ini 文件,但是有对应的模版文件 php.ini.default
php.ini 路径: /private/etc 或者 /etc 目录里面找到 php.ini.default 文件
1. httpd.conf 配置文件 AddType: https://blog.csdn.net/frankarmstrong/article/details/72235206

2. php.ini 系统时区设置:
https://www.jianshu.com/p/c83473971eda
3. 文件目录分析:

4. 常用命令行
Windows 中使用 httpd.exe -t 检查 apache 有没有问题,Mac中则没有 httpd.exe 命令,则使用:
// 查看apache版本号
apachectl -v
// 检查apache配置文件是否正确
apachectl -t