1. 程式人生 > >apache配置監聽多個埠

apache配置監聽多個埠

在httpd.conf 中新增listen   

比如listen  80    listen 8081     listen  8082等,把想要新增的埠號全部新增進來

把虛擬配置檔案載入進來    Include conf/extra/httpd-vhosts.conf 然後就是虛擬主機的配置了,在virtual host裡邊注意新增埠號 <VirtualHost *:80>     ServerAdmin [email protected]     DocumentRoot "F:/Work/myself/MR/MR"     ServerName localhost
    ServerAlias mr.cc     ErrorLog "logs/dummy-host.example.com-error.log"     CustomLog "logs/dummy-host.example.com-access.log" common     <Directory "F:/Work/myself/MR/MR">      Options Indexes FollowSymLinks      AllowOverride None      Order allow,deny      Allow from all      </Directory>
</VirtualHost> 注意 : directory 一定不能少