苹果电脑搭建网站
2022-04-29 21:22:35
1. 打开命令行工具 `^ C`
2. 运行apache服务`sudo apachectl start`
3. apache配置文件路径`/etc/apache2/httpd-vhost.conf`,添加网站
```
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "/Users/liangjingyuan/sites/train.budun.com/public"
ServerName train-ticket.com
ErrorLog "/private/var/log/apache2/dummy-host2.example.com-error_log"
CustomLog "/private/var/log/apache2/dummy-host2.example.com-access_log" common
```
4. hosts文件路径 `/etc/hosts`,添加访问域名