黃聰:windows下使用xampp3.2.2配置多個監聽連接埠和不同的網站目錄

來源:互聯網
上載者:User

標籤:com   tom   著作權   denied   圖片   pre   listen   stat   conf   

windows下使用xampp3.2.2配置多個監聽連接埠和不同的網站目錄

一:配置Apache檔案httpd.conf

開啟Apache的設定檔httpd.conf,可以通過點擊xampp的Apache的config下的Apache(httpd.conf)開啟。 
首先在Listen 80 
下面添加監聽連接埠如

Listen 8001Listen 8002
  • 1
  • 2

然後在httpd.conf最後的位置插入:

NameVirtualHost *:8001<VirtualHost *:8001>ServerName localhost:8001DocumentRoot "D:/xampp/htdocs1"</VirtualHost>NameVirtualHost *:8002<VirtualHost *:8002>ServerName localhost:8002DocumentRoot "D:/xampp/htdocs2"</VirtualHost>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

接著把以下地方 

修改為:

<Directory />    #AllowOverride none    #Require all denied    Order deny,allow    Allow from all</Directory>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

關閉檔案httpd.conf。

二:開啟windows的8001、8002連接埠

可設定windows防火牆->進階設定->出站規則->建立規則。

三:建立網站目錄檔案夾

四:重啟Apache服務五:瀏覽器查看結果

http://localhost:8001/index.html 
 
http://localhost:8002/index.html 

著作權聲明:歡迎轉載75646344

黃聰:windows下使用xampp3.2.2配置多個監聽連接埠和不同的網站目錄

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.