使用军哥的lnmp配置虚拟主机,需要注意的是要配置hosts文件

#使用军哥的lnmp配置虚拟主机,需要注意的是要配置hosts文件(这一点官方没有讲到)
具体方法:
1、修改hosts文件
sudo vim /etc/hosts

2、在hosts文件中新增一行(这里类似于windows上配置hosts文件)
127.0.0.1 www.baidu.com

3、保存并重启网络
sudo /etc/init.d/networking restart

相关文章

#使用军哥的lnmp配置虚拟主机,需要注意的是要配置hosts文件(...
一、配置编译环境 yum update && yum upgra...
一、下载repo文件 二、备份并替换系统的repo文件 三、执行yu...
LAMP -- Linux Apache MySQL PHP 在CentOS安装的顺序,我一般...
一、下载nginx安装包,官网下载中心http://nginx.org/downlo...
1.下载composer curl -sS https://getcomposer.org/installe...