Apache php httpd-xampp.conf别名不起作用

时间:2014-06-30 05:14:38

标签: apache httpd.conf mod-alias

我有

的httpd-xampp.conf
<IfModule alias_module>
...
    Alias /examples "D:/xampp/htdocs/examples/" 
    <Directory "D:/xampp/htdocs/examples">
        Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
    Require all granted
    </Directory>
</IfModule>

在示例文件夹中我有index.html,但是当我访问http://localhost:8880/examples时,我有错误

This page was not found

You are not logged in.

Back Log in Issues

我的配置有错误吗?其他别名:phpmyadmin,安全性很好。

1 个答案:

答案 0 :(得分:1)

我将httpd-xampp.conf更改为

<IfModule alias_module>
...
    #!!! Don't know why
    #Alias /examples "D:/xampp/examples/" don't work 

    Alias /my-examples "D:/xampp/examples/" 
    <Directory "D:/xampp/examples">
        AllowOverride AuthConfig
        Require all granted
    </Directory>
</IfModule>

#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info|my-examples))">
        Require local
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

http://localhost:8880/my-examples现在正在工作