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>

  • 相关阅读:
    spring-data-elasticsearch (elasticsearch 6.7.0) @Document 和 @Field 注解详解
    干货链接(大神)
    Excel word PDF导入导出 Easy POI
    helm 源大集合
    K8s学习干货
    K8S
    阳明大神---容器时代
    K8s高可用集群部署
    最小 docker_lpnm系统
    python 协程和异步编程全解
  • 原文地址:https://www.cnblogs.com/xxhong/p/3036897.html
Copyright © 2011-2022 走看看