1. httpd.conf 增加 index.php,index.php 要在index.html前
<IfModule dir_module>
DirectoryIndex index.php index.html index.htm
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
</IfModule>
2./etc/apache2/extra/httpd-vhosts.conf 具体配置域名配置如下
<VirtualHost *:80>
ServerName www.dongli-admin.com
DocumentRoot "/Users/AarthiModoo/Desktop/E/work/Mars/public"
ErrorLog "/private/var/log/apache2/work-error_log"
CustomLog "/private/var/log/apache2/work-access_log" common
<Directory />
Options Indexes FollowSymLinks MultiViews
AllowOverride All // 这个要是All
Order deny,allow
Allow from all
</Directory>
</VirtualHost>