1.开启apache的mod_rewrite功能
关闭注释
LoadModule rewrite_module modules/mod_rewrite.so
2.引入http-vhosts.conf文件
关闭注释
Include conf/extra/httpd-vhosts.conf
3.添加VIrtualHost配置
修改 conf/extra/httpd-vhosts.conf
#qh backend
<VirtualHost *:80>
ServerAdmin qhadmin.com
DocumentRoot "/web_data/new_qhmoney/backend/web"
ServerName qhadmin.com
ErrorLog "logs/qhadmin.com-error_log"
CustomLog "logs/qhadmin.com-access_log" common
<Directory /web_data/new_qhmoney/backend/web>
AllowOverride All
Options FollowSymLinks
</Directory>
4.修改host文件
添加 127.0.0.1 hah.com