美文网首页
ubuntu下虚拟域名配置

ubuntu下虚拟域名配置

作者: Qfey_k | 来源:发表于2019-01-14 11:16 被阅读0次

`

hosts

sudo vim /etc/hosts //打开hosts文件
添加虚拟域名


`

apache2

cd /etc/apache2/sites-available //进入目录
sudo cp 000-default.conf ***.conf //复制并重命名
sudo vim .conf //打开文件编辑
ServerName 后面修改为你的虚拟域名/DocumentRoot 路径
OK

sudo ln -s /etc/apache2/sites-available/
.conf ../sites-enabled/ //链接文件
sudo /etc/init.d/apache2 restart //重启服务
`

相关文章

网友评论

      本文标题:ubuntu下虚拟域名配置

      本文链接:https://www.haomeiwen.com/subject/axborqtx.html