`

Apache 项目路径重定位

阅读更多

众所周知,Apache的工程根目录是在htdocs里面,也就是说我们如果要发布工程,就必须放在htdocs里面;所以我们需要项目路径重定位,比如 说我的工程是放在D:/Test中,我们只需修改http.conf里里面的内容,即可将D:/Test工程发布到apache中,代码修改如下:
找到<IfModule alias_module></IfModule>,修改如下:
<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://localhost/bar

    #
    # 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 /test/ "D:/Test/"               #这个就是我们需要添加的工程重定位

</IfModule>

当然,我们还需要加入路径参数,是加在<IfModule alias_module></IfModule>下面:
<Directory "D:/Test">       #这个是我们要添加的Test工程的路径参数设置
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

分享到:
评论

相关推荐

    JAVA上百实例源码以及开源项目源代码

     util实现Java图片水印添加功能,有添加图片水印和文字水印,可以设置水印位置,透明度、设置对线段锯齿状边缘处理、水印图片的路径,水印一般格式是gif,png,这种图片可以设置透明度、水印旋转等,可以参考代码...

    JAVA上百实例源码以及开源项目

     util实现Java图片水印添加功能,有添加图片水印和文字水印,可以设置水印位置,透明度、设置对线段锯齿状边缘处理、水印图片的路径,水印一般格式是gif,png,这种图片可以设置透明度、水印旋转等,可以参考代码...

    subversion-TortoiseSVN-使用手册(CHM+HTML,中英完整版)

    3.1. 以Apache为基础的服务器 3.1.1. 简介 3.1.2. 安装Apache 3.1.3. 安装Subversion 3.1.4. 配置 3.1.5. 多版本库 3.1.6. 路径为基础的授权 3.1.7. 使用Windows域认证 3.1.8. 多重认证源 3.1.9. 用SSL使服务器更...

    SVN操作手册中文版网页格式

    3.6.7. svnserve 基于路径的授权 3.7. 基于 Apache 的服务器 3.7.1. 简介 3.7.2. 安装 Apache 3.7.3. 安装 Subversion 3.7.4. 配置 3.7.5. 多版本库 3.7.6. 路径为基础的授权 3.7.7. 使用 Windows 域认证 ...

    新版Android开发教程.rar

    o Apache Ant 1.6.5 or later for Linux and Mac, 1.7 or later for Windows o Not Not Not Not compatible with Gnu Compiler for Java (gcj) Note: Note: Note: Note: If JDK is already installed on your ...

    asp.net知识库

    XPath中相对路径和绝对路径 XPath 简单语法 Asp.Net(C#)利用XPath解析XML文档示例 XSL .Net框架下的XSLT转换技术简介 一个XSLT的简单例子 XSLXSLT板主题整理 xsl入门的好文章 新手学习XSL的好东西 XSL语法介绍 XSL...

    TortoiseSVN中文手册

    3.1. 基于 Apache 的服务器 ............................................... 14 3.1.1. 简介 ......................................................... 14 3.1.2. 安装 Apache ..................................

    超级有影响力霸气的Java面试题大全文档

    超级有影响力的Java面试题大全文档 1.抽象: 抽象就是忽略一个主题中与当前目标无关的那些方面,以便更充分地注意与当前目标有关的方面。抽象并不打算了解全部问题,而只是选择其中的一部分,暂时不用部分细节。...

    java 面试题 总结

    JAVA相关基础知识 1、面向对象的特征有哪些方面 1.抽象: 抽象就是忽略一个主题中与当前目标无关的那些方面,以便更充分地注意与当前目标有关的方面。抽象并不打算了解全部问题,而只是选择其中的一部分,暂时不用...

Global site tag (gtag.js) - Google Analytics