我的配置:windows7+apache+php 
编写环境:dreamweaver我在根目录htdocs下建立了一个站点
现在我想测试一下另外一个下载的整站源码,两个同时随时可以测试改如何办呢?
配置php.ini吗?还是、、、

解决方案 »

  1.   

    在apache的conf加入下面的咚咚<VirtualHost IP:新端口>
        ServerAdmin 电邮
        DocumentRoot "新网站的根目录"
        ServerName localadm
        ErrorLog logs/dummy-host.example.com-error_log
        CustomLog logs/dummy-host.example.com-access_log common
    </VirtualHost>注意端口要用新的,IP不广播的话用127.0.0.1,广播的话用本机局域网IP
    重启以后就用http://127.0.0.1:新端口 访问
      

  2.   

    就是apache的virtualhost
    二楼说的比较清楚了哈:)
    更详细的可以去看apache的官方文档
      

  3.   


    有时候需要大量文件操作,涉及路径,这样很难用document_root变量
    因为即使用了,上传到空间又要逐个改……
      

  4.   

    装 phpnow集成环境吧 (php + mysql +apache + zend),设置虚拟主机 易如反掌,而且不需要改端口,可以任意设置域名,比如:www.a.com www.b.com www.aa.com等等。
      

  5.   

    我在LINUX下弄成功了,修改的是http-vhost.conf文件。你看你的微软系统里有没有这个文件
      

  6.   

    <VirtualHost 127.0.0.2:80>
    DocumentRoot "D:\htdocs\news.windsfly.cn"
    ServerName 127.0.0.2:80
    RewriteEngine on
    RewriteRule /(.*)fc0(.*)_(.*)_(.*)_(.*).html /$1$2.php?id=$3&page=$4&pz=$5 [PT]
    RewriteRule /(.*)fc0(.*)_(.*)_(.*).html   /$1$2.php?id=$3&page=$4 [PT]
    RewriteRule /(.*)fc0(.*)_(.*).html   /$1$2.php?id=$3 [PT]
    RewriteRule /(.*)fc0(.*).html /$1$2.php  [PT]
    RewriteRule /(.*)_(.*).html /$1.php?zone=$2 [PT]
    RewriteRule /(.*)-(.*).html /$1.php?word=$2 [PT]
    </Virtualhost>
    <Directory "D:\htdocs\news.windsfly.cn">
        Options Indexes FollowSymLinks Multiviews
        AllowOverride All
        order Allow,Deny
        Allow from all
    </Directory>
    换成你想要的目录就行,在http.conf里面添加!