转:linux(本机)配置域名(多域名)

1. 修改linux的hosts(本机)

修改文件:/etc/hosts : 127.0.0.1 budget.cdsafe.com.cn

2. 修改conf文件,使其加载 httpd-vhosts.conf

打开 :/opt/lampp/etc/httpd.conf 488行
# Virtual hosts
#Include etc/extra/httpd-vhosts.conf
去掉前面的#号

3. 修改vhosts,配置域名(多域名)


DocumentRoot “/opt/lampp/htdocs/budget”
ServerName budget.cdsafe.com.cn

4. 重启服务器
/opt/lampp/lampp stopapache
/opt/lampp/lampp startapache

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>