1.找到apache中httpd-vhosts.conf
Listen 8889
<VirtualHost bfa:8889>
DocumentRoot /Applications/MAMP/htdocs/new_web_pstrom/app/webroot
ServerName bfa
ServerAlias bfa
ErrorLog "/log/httpd/new_default-error.log"
CustomLog "/log/httpd/new_default.log" common
</VirtualHost>
2.hosts
添加
#Apache vhost
127.0.0.1 bfa
3.地址
网站的图片,文件相对路径从DocumentRoot 下开始寻找