apache2.4 虚拟目录配置

找到apche配置文件 httpd.conf  在文件最后面添加下面代码

#站点别名

Alias /myblog "D:/Project/PHP/webTest"

<Directory "D:/Project/PHP/webTest"> 
 Options Indexes MultiViews 
 AllowOverride None
 Require all granted
</Directory>

之后配置 NB IDE 就可以运行了





题外话  更改默认站点htdocs 

DocumentRoot "D:/Project/PHP/web"
<Directory "D:/Project/PHP/web">
    #
    # 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.4/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:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride None


    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>  

猜你喜欢

转载自blog.csdn.net/u013051638/article/details/75033040
今日推荐