【问题标题】:Apache php httpd-xampp.conf alias not workingApache php httpd-xampp.conf 别名不起作用
【发布时间】:2014-06-30 05:14:37
【问题描述】:

我有 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,安全性很好。

【问题讨论】:

    标签: apache httpd.conf mod-alias


    【解决方案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 现在工作

    【讨论】:

      猜你喜欢
      • 2012-12-17
      • 1970-01-01
      • 2017-11-04
      • 2019-04-27
      • 1970-01-01
      • 2017-11-14
      • 2017-10-19
      • 2014-08-23
      • 2017-12-01
      相关资源
      最近更新 更多