mac apache 2.4的配置
开启vhost 文件 命令行输入
vim /etc/apache2/httpd.conf
找到把前边的#
include /private/etc/apache2/extra/httpd-vhost.conf
开启改写模块
找到下一行命令
LoadModule rewrite_module modules/mod_rewrite.so
把前边的#去掉
打开配置httpd-vhost.conf
sudo vim /etc/apache2/extra/httpd-vhosts.conf
添加配置信息
<VirtualHost *:80> DocumentRoot "/Library/WebServer/Documents/shop" ServerName dragon.cn ErrorLog "/private/var/log/apache2/dummy-dragon.cn-error_log" CustomLog "/private/var/log/apache2/dummy-dragon.cn-access_log" common <Directory /> options none AllowOverride none Require all granted </Directory> </VirtualHost>
然后修改
Options none AllowOverride noe
为
Options FollowSymLinks AllowOverride All
最后 配置php.ini
sudo cp /etc/php.ini.default /etc/php.ini
配置一些php需要的扩展即可