国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 江油市| 图片| 南陵县| 富川| 冀州市| 平邑县| 泰顺县| 苍南县| 钟山县| 墨竹工卡县| 石屏县| 炉霍县| 城市| 庆城县| 横山县| 东乡族自治县| 永修县| 湖州市| 会宁县| 浙江省| 鲜城| 尤溪县| 德清县| 江安县| 鸡西市| 乐都县| 吉林市| 无棣县| 苗栗市| 古蔺县| 奎屯市| 达拉特旗| 三穗县| 陈巴尔虎旗| 郯城县| 平定县| 镇原县| 清流县| 会东县| 蒙阴县| 大厂|