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端口所在的网站目录。

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

  • 相关阅读:
    mongoDB看这篇就够了
    放不下
    jmeter连接不上MySQL数据库的原因以及解决方法
    SecureCRT自动断开连接的解决方法
    Linux及Windows查看占用端口的进程
    网络基础知识
    selenium中driver.close()和driver.quit()的不同点
    day2_窗口句柄切换
    day6_异常捕捉
    day6_logging模块
  • 原文地址:https://www.cnblogs.com/relix/p/4641042.html
Copyright © 2011-2022 走看看