1. 修改linux的hosts(本机)
修改文件:/etc/hosts : 127.0.0.1 budget.cdsafe.com.cn
2. 修改conf文件,使其加载 httpd-vhosts.conf
打开 :/opt/lampp/etc/httpd.conf
# Virtual hosts
#Include etc/extra/httpd-vhosts.conf
去掉前面的#号
3. 修改vhosts,配置域名(多域名)
<VirtualHost *:80>
DocumentRoot “/opt/lampp/htdocs/budget”
ServerName budget.cdsafe.com.cn
修改文件:/etc/hosts : 127.0.0.1 budget.cdsafe.com.cn
2. 修改conf文件,使其加载 httpd-vhosts.conf
打开 :/opt/lampp/etc/httpd.conf
# Virtual hosts
#Include etc/extra/httpd-vhosts.conf
去掉前面的#号
3. 修改vhosts,配置域名(多域名)
<VirtualHost *:80>
DocumentRoot “/opt/lampp/htdocs/budget”
ServerName budget.cdsafe.com.cn
</VirtualHost>
4. 重启服务器
写命令