ubuntu16.04配置虚拟主机
2017-07-02 22:37
465 查看
一、配置虚拟主机
1.在Linux系统中找到
/etc/hosts
在文件中添加当前主机IP地址和你自定义的虚拟域名,例如:
127.0.0.1 www.test.com
2.在“/etc/apache2/sites-available”目录下有“000-default.conf”
将000-default.conf 复制一份叫做 test.conf
3 .进入test.conf
修改 ServerName 和 DocumentRoot
ServerName www.test.net
DocumentRoot/var/www/html/laravel/public
4.ln -s /etc/apache2/sites-available/test.conf ../sites-enabled/
5.重启Apache:sudo service apache2 restart
1.在Linux系统中找到
/etc/hosts
在文件中添加当前主机IP地址和你自定义的虚拟域名,例如:
127.0.0.1 www.test.com
2.在“/etc/apache2/sites-available”目录下有“000-default.conf”
将000-default.conf 复制一份叫做 test.conf
3 .进入test.conf
修改 ServerName 和 DocumentRoot
ServerName www.test.net
DocumentRoot/var/www/html/laravel/public
4.ln -s /etc/apache2/sites-available/test.conf ../sites-enabled/
5.重启Apache:sudo service apache2 restart
相关文章推荐
- Ubuntu16.04 + Nginx 配置虚拟主机
- ubuntu 16.04 xampp环境配置虚拟主机
- Ubuntu16.04 apache2配置虚拟主机
- ubuntu16.04 nginx1.10.3 配置虚拟主机
- Ubuntu 16.04与Apache虚拟主机配置的步骤详解
- Ubuntu16.04 配置虚拟主机
- Ubuntu16.04 apache2配置虚拟主机
- ubuntu 12.04下面配置nginx虚拟主机
- ubuntu apache2配置详解(含虚拟主机配置方法)
- ubuntu下apache&php&虚拟主机开发环境配置
- ubuntu中Apache 虚拟主机的配置
- ubuntu下xampp配置虚拟主机
- Ubuntu 下配置虚拟主机
- ubuntu server 10.04 apache2配置多个虚拟主机
- Ubuntu下apache的多虚拟主机配置
- 【转】ubuntu apache2配置详解(含虚拟主机配置方法)
- ubuntu配置虚拟主机
- ubuntu nginx配置虚拟主机,目录
- ubuntu apache2配置详解(含虚拟主机配置方法)
- ubuntu下配置apache虚拟主机