频道栏目
首页 > 资讯 > 虚拟机 > 正文

配置apache基于IP的虚拟主机步骤教程

18-06-11        来源:[db:作者]  
收藏   我要投稿

0.我用桥接的方式为虚拟机配置了两张网卡如下:

1.在系统根目录下创建文件夹app1 app2 创建index.html 如:/app1/index.html /app2/index.html

2.httpd.conf配置如下:

Alias /app11 /app1

Options Indexes MultiViews FollowSymLinks

AllowOverride None

Order allow,deny

Allow from all

Require all granted

Alias /app22 /app2

# AuthType Basic

# Authname "This is a private dir"

# AuthUserFile /etc/httpd/password

Options Indexes MultiViews FollowSymLinks

AllowOverride None

Order allow,deny

Allow from all

Require all granted

# Require valid-user

ServerAdmin root@exmaple.com

DocumentRoot /app1

ServerName 192.168.1.100

ErrorLog logs/100error

CustomLog logs/100access common

ServerAdmin root@exmaple.com

DocumentRoot /app2

ServerName 192.168.1.106

ErrorLog logs/106error

CustomLog logs/106access common

3.httpd.conf配置端口监听IP

4.service httpd restart

5.测试

相关TAG标签
上一篇:linux和windows互传文件 、用户配置文件和密码配置文件、用户组管理 、用户管理
下一篇:关于CentOS版本问题,安装虚拟机的时候会出现不同的问题
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站