• php虚拟主机配置 权限


    httpd.conf 

    打开Include conf/extra/httpd-vhosts.conf

    在其httpd-vhosts.conf中配置虚拟目录

    <VirtualHost *:80>
        ServerAdmin www.xxhong.com
        DocumentRoot D:/dev/php/Apache2.2/htdocs/xxhong
    </VirtualHost>
    目录配置

    如果不配置某个目录,则走默认的目录配置

    <Directory />
        Options FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
    </Directory>

    若配置了,则走此

    <Directory "D:/dev/php/Apache2.2/htdocs">
        #
        # Possible values for the Options directive are "None", "All",
        # or any combination of:
        #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
        #
        # Note that "MultiViews" must be named *explicitly* --- "Options All"
        # doesn't give it to you.
        #
        # The Options directive is both complicated and important.  Please see
        # http://httpd.apache.org/docs/2.2/mod/core.html#options
        # for more information.
        #
        Options Indexes FollowSymLinks

        #
        # AllowOverride controls what directives may be placed in .htaccess files.
        # It can be "All", "None", or any combination of the keywords:
        #   Options FileInfo AuthConfig Limit
        #
        AllowOverride None

        #
        # Controls who can get stuff from this server.
        #
        Order allow,deny
        Allow from all

    </Directory>

    </Directory>

    放到虚拟主机配置文件中

    httpd-vhosts.conf

    <VirtualHost *:80>
        ServerAdmin ecshop.xxhong.com
        DocumentRoot D:/dev/php/www/ecshop
        <Directory "D:/dev/php/www">
           Allow from all
        </Directory>
    </VirtualHost>

    分部式配置

    .htaccess  当前目录 及子目录  

    <VirtualHost *:80>
        ServerAdmin ecshop.xxhong.com
        DocumentRoot D:/dev/php/www/ecshop
        <Directory "D:/dev/php/www">
           Allow from all

       AllowOverride All
        </Directory>
    </VirtualHost>

  • 相关阅读:
    对C#泛型中的new()约束思考
    c语言位运算符
    最简单易懂的委托例子
    静态方法是否属于线程安全
    使用JS实现鼠标滚轮事件
    Google Map 自定义 infowindow
    firefox下对ajax的onreadystatechange的支持情况分析及解决
    xcode7和ios9下UIWebView不能加载网页的解决方法
    在iOS平台使用ffmpeg解码h264视频流(转)
    Mac下批量删除.svn文件
  • 原文地址:https://www.cnblogs.com/xxhong/p/3036897.html
Copyright © 2020-2023  润新知