<VirtualHost 192.168.0.55:801>
  DocumentRoot "E:\phpwork"
</VirtualHost>
站点为什么不能指定路径?

解决方案 »

  1.   

    指定过去没有效果,非得用这方式才行
    <!-- <br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> -->DocumentRoot " D:/Tweb/hooyes/webroot " (E:/phpwork)#
    # This should be changed to whatever you set DocumentRoot to.
    #
    <Directory " E:/phpwork" > (这个地方也要修改)不知道是我那里配的不对,如果一定要这样的话,搞2个以上站点不是很麻烦了?
    谢谢指教
      

  2.   

    指定过去没有效果,无法找到该页,非得用这方式才行
    <!-- <br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> -->DocumentRoot " E:/phpwork" #
    # This should be changed to whatever you set DocumentRoot to.
    #
    <Directory " E:/phpwork" > (这个地方也要修改)不知道是我那里配的不对,如果一定要这样的话,搞2个以上站点不是很麻烦了?
    谢谢指教
      

  3.   

    <VirtualHost 192.168.0.55:801>
      DocumentRoot "E:\phpwork"
    </VirtualHost>你的这个是在哪个文件中配置的,全名
      

  4.   

    <VirtualHost 192.168.0.55:801>这个是主机
      DocumentRoot "E:\phpwork"
    <Directory " E:/phpwork" >这个是主机下的虚拟目录</Directory>
    </VirtualHost>
      

  5.   

    httpd.conf文件里配置的,这个应该不会错的.
    我现在怀疑这版本是不是不支持这样的方法?
      

  6.   

    VirtualHost貌似是在httpd-vhosts.conf中配置的方式,Directory才是httpd.conf中的配置方式
    猜的
      

  7.   

    apache 手册上还有一个叫
    NameVirtualHost 命令设置了吗?
      

  8.   

    <VirtualHost 192.168.0.97:80>
    DocumentRoot "E:/phpWork/"
    ServerAdmin admin@localhost
    ServerName www.xxx.com
    ServerAlias xxx.comxxxxx
      

  9.   

    NameVirtualHost *:80
    NameVirtualHost *:443  如果需要 https 把这个也加上.
      

  10.   

    没有打开 VirtualHost 。所以 你的 VirtualHost 段 没起作用。
      

  11.   

    首先:
    讲apache 中conf/httpd.conf文件中
    #Include conf/extra/httpd-vhosts.conf
    这句前面的"#"去掉
    然后在
    conf/extra/httpd-vhosts.conf 文件中 添加下面的内容
    <VirtualHost *:80>
        ServerAdmin [email protected]
        DocumentRoot "D:/www/mall/upload"
        ServerName ecmall
        ErrorLog "logs/localhost-error.log"
        CustomLog "logs/localhost-access.log" common
    </VirtualHost>其中DocumentRoot 后面跟的时候你项目的绝对路径
    ServerName 跟的是用哪个 域名访问
      

  12.   

    ActiproSoftware WPF Studio 2010.2 Released 出来了