国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網(wǎng)站 > Apache > 正文

Virtual Host on Apache(Apache上建立虛擬主機(jī))

2024-08-27 18:29:17
字體:
供稿:網(wǎng)友
Virtual Host on Apache(Apache上建立虛擬主機(jī))

0. Introduction

Usually, we want to build two or more websites on a web server, but we have only one ip and do not want to use ports (eg. www.abc.com:8081) to visit webpages.

So, how to make www.a.com and www.b.com both point to server X.X.X.X ?

1. Environment

Ubuntu 14.04 x64

BitnamiLAMP Stack 5.4.40

2. Steps

2.0. Configure "A" records of www.a.com and www.b.com to IP X.X.X.X

2.1. Make new dirs in .../apache2/htdocs for these two sites, such as, htdocsa and htdocsb

2.2. Modify .../apache2/conf/httpd.conf, add following codes:

NameVirtualHost X.X.X.X<VirtualHost X.X.X.X:80>ServerAdmin admin@a.comDocumentRoot /opt/lampstack-5.4.40-0/apache2/htdocs/htdocsaServerName www.a.com</VirtualHost>NameVirtualHost X.X.X.X<VirtualHost X.X.X.X:80>ServerAdmin admin@b.comDocumentRoot /opt/lampstack-5.4.40-0/apache2/htdocs/htdocsbServerName www.b.com</VirtualHost>

2.3. Restart apache

3. References

http://www.CUOXin.com/wpjsolo/archive/2012/01/19/2327457.html

http://www.xker.com/page/e2010/0925/98279.html

(This article is from http://www.CUOXin.com/chenyineng/p/4450978.html, and belongs to http://chenyineng.CUOXin.com and http://www.chenyineng.info)


發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 玉田县| 道真| 徐闻县| 崇义县| 吴旗县| 防城港市| 云浮市| 麻江县| 合作市| 麻城市| 灵石县| 大庆市| 文昌市| 宜宾市| 宁德市| 绥化市| 肥乡县| 青龙| 大冶市| 天全县| 镇江市| 贵港市| 修文县| 上思县| 徐闻县| 巴彦淖尔市| 卓尼县| 西林县| 乐业县| 宜君县| 新闻| 新巴尔虎左旗| 丹东市| 永修县| 登封市| 丹江口市| 柏乡县| 岳阳市| 威信县| 阜阳市| 乐清市|