Apache配置多端口

1、修改apache\conf\httpd.config文件,增加Listen

2、修改apache\conf\httpd.config文件,增加ServerName

3、修改apache\conf\httpd.config文件,開啓虛擬主機

4、修改apache\conf\extra\httpd-vhosts.config文件,增加NameVirtualHost

 

5、修改apache\conf\extra\httpd-vhosts.config文件,增加配置


<VirtualHost 【第4不增加的NameVirtualHost】>
 ServerName 【第2步裏增加的ServerName】
 DocumentRoot "代碼文件夾路徑" 
 <Directory "代碼文件夾路徑">  
  Options FollowSymLinks IncludesNOEXEC Indexes
  DirectoryIndex index.php index.html index.shtml
  AllowOverride All
  Order Deny,Allow
  Allow from all
 </Directory>
</VirtualHost>

6、注意要在防火牆那開啓端口

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章