zoukankan      html  css  js  c++  java
  • 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>

  • 相关阅读:
    hdu1087Super Jumping! Jumping! Jumping!(dp)
    划分树 hdu4417Super Mario
    poj2240Arbitrage(map+floyd)
    hdu4282A very hard mathematic problem
    hdu1421搬寝室(dp)
    【洛谷P3806】【模板】点分治1
    【CF914E】Palindromes in a Tree
    GDOI2020 游记
    【POJ2296】Map Labeler
    【洛谷P6623】树
  • 原文地址:https://www.cnblogs.com/xxhong/p/3036897.html
Copyright © 2011-2022 走看看