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

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

基于端口配置Apache虛擬機方法

2024-08-27 18:24:27
字體:
供稿:網(wǎng)友
  apache配置虛擬機的方式一共有三種方式,今天介紹如何在基于端口的情況下配置虛擬機。
  第一步:將監(jiān)聽端口添加到主配置文件:
  [root@localhost conf]# vim /etc/httpd/conf/httpd.conf
  在原有行Listen 80行的基礎(chǔ)上, 在添加一行
  Listen 8080
  第二步:將8080端口的虛擬配置添加好:
  [root@localhost conf.d]# cat virtualhost.conf
  <VirtualHost 192.168.137.200:80>
  DocumentRoot "/var/www/test200"
  ServerName    www.test200.com
  </VirtualHost>
  <VirtualHost 192.168.137.201:80>
  DocumentRoot "/var/www/test201"
  ServerName    www.test201.com
  </VirtualHost>
  #下面的內(nèi)容是在上面的配置的基礎(chǔ)上添加的。
  <VirtualHost 192.168.137.201:8080>
  DocumentRoot "/var/www/test201-8080"
  ServerName    www.test201-8080.com
  </VirtualHost>
  [root@localhost conf.d]# cd /var/www/           #切換目錄
  [root@localhost www]# mkdir test201-8080        #創(chuàng)建目錄
  [root@localhost www]# echo "test201-8080" >>./test201-8080/index.html   #創(chuàng)建主頁
  第三步:檢測
  [root@localhost www]#  service httpd restart
  Stopping httpd:                                            [  OK  ]
  Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
  [  OK  ]
  [root@localhost conf]# elinks -source 192.168.137.201:80
  test201
  [root@localhost conf]# elinks -source 192.168.137.201
  test201
  [root@localhost conf]# elinks -source 192.168.137.201:8080
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 六枝特区| 深州市| 栾城县| 邳州市| 乃东县| 仙桃市| 乌拉特前旗| 玉龙| 拉萨市| 光泽县| 会泽县| 叶城县| 孟连| 宁波市| 佳木斯市| 五原县| 府谷县| 东莞市| 许昌市| 方山县| 嘉义市| 孝感市| 曲阳县| 涪陵区| 伊吾县| 鹿邑县| 湄潭县| 克拉玛依市| 阿合奇县| 福清市| 永安市| 突泉县| 广平县| 七台河市| 横山县| 武强县| 河北省| 金华市| 民权县| 兴业县| 东方市|