zoukankan      html  css  js  c++  java
  • wamp集成环境下配置多个站点

    步骤一:打开D:wampinapacheApache2.2.21conf目录下的httpd.conf文件,搜索Listen 80,在其后加上Listen 88

    Xml代码 
    1. #Listen 12.34.56.78:80  
    2. Listen 80  
    3. Listen 88  

    步骤二:找到Include conf/extra/httpd-vhosts.conf,将前面的#去掉

    Xml代码 
    1. # Virtual hosts  
    2. Include conf/extra/httpd-vhosts.conf  

    步骤三:打开同目录下的extra文件夹下的httpd-vhosts.conf,默认有两个

    Xml代码 
    1. <VirtualHost *:80>  
    2.     ServerAdmin webmaster@dummy-host2.example.com  
    3.     DocumentRoot "c:/Apache2/docs/dummy-host2.example.com"  
    4.     ServerName dummy-host2.example.com  
    5.     ErrorLog "logs/dummy-host2.example.com-error.log"  
    6.     CustomLog "logs/dummy-host2.example.com-access.log" common  
    7. </VirtualHost>  

    修改后面一个,将VirtualHost *:80改为VirtualHost *:88,DocumentRoot "d:/wamp/www/"改为DocumentRoot "你的网站的目录"。

    如:

    Xml代码 
    1. <VirtualHost *:88>  
    2.     ServerAdmin webmaster@dummy-host2.example.com  
    3.     DocumentRoot "d:/wamp/www/king"  
    4.     ServerName dummy-host2.example.com  
    5.     ErrorLog "logs/dummy-host2.example.com-error.log"  
    6.     CustomLog "logs/dummy-host2.example.com-access.log" common  
    7. </VirtualHost>  

    第一个里面的DocumentRoot "d:/wamp/www/"改为80端口所在的网站目录。

    注:修改前请备份好这两个文件。

  • 相关阅读:
    nginx面试题
    解决zabbix图形显示“方块”问题
    echo命令详解
    Ubantu1804更换阿里源
    arp命令
    /boot、/和/swap分区扩容
    windows server 2016 安装 .Net Framework失败解决方案
    报错kernel:NMI watchdog: BUG: soft lockup
    jenkins 常用插件源URL
    jenkins rpm包方式安装
  • 原文地址:https://www.cnblogs.com/relix/p/4641042.html
Copyright © 2011-2022 走看看