首页 | 新闻 | 交流 | 问吧 | 文档 | 手册 | 下载 | 博客

收藏此问题 发表新评论

请教:关于Windows下Apache配置虚拟目录的问题

如有hi.csdn.net域名,其使用虚拟目录有hi.csdn.net/liwei

这个liwei的虚拟目录不知道怎么在httpd.conf配置文件里添加配置?

我在网上查了一个下午,尝试了很多种配置,可依然不行。

我想进行的是通过对虚拟目录配置,达到访问类似 http://hi.csdn.net/liwei 的目的。

如现在变成是 http://hi.myvod.cn/liwei

以下是我最近进行的配置,但依然不能进行浏览,

Alias /liwei / "e:/php2009/htm"
<Directory "e:/php2009/htm">
Options Indexes MultiViews
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>

==========
当然上面有很多种说法,可以放在不同的httpd.conf 的地方 ,但究竟放在哪里,要怎么配置才能达到要求?

知道的朋友请回答一下,谢谢!
昵称: raylus  时间: 2009-03-26 22:00:00
我的放在这里了
<IfModule alias_module>
    #
    # Redirect: Allows you to tell clients about documents that used to
    # exist in your server's namespace, but do not anymore. The client
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://meng/bar
   Alias /d d:
    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.

    #
    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/"

</IfModule>
昵称: mengshan  时间: 2009-04-25 10:22:00