###启动自带apache
sudo apachectl -k start //启动自带apache ,stop表示停止 restart表示重启
###apache目录
默认是隐藏apache安装目录
cd /private/etc/apache2/
vi httpd.conf
在配置文件中 可以找到默认的web目录是 /Library/WebServer/Documents
###修改目录
修改 httproot path
###Apache 配置检查
sudo apachectl configtest
sudo apachectl -t
###???重启apache
如果无法重启apache 可以尝试下面命令
sudo /usr/sbin/httpd -k start
###设置虚拟目录
设置虚拟目录的路径
~/user/project 不要设置到 ~/Download/app/www下面 这样会有目录访问权限的问题
###Httpd 支持php
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>
###参考配置https http://blog.youkuaiyun.com/logico/article/details/52179603
http://blog.youkuaiyun.com/zhu410289616/article/details/46566073
http://stackoverflow.com/questions/20127138/apache-2-4-configuration-for-ssl-not-working
###安装证书
将*.crt证书放到web根目录下,使用手机访问crt文件,安装证书