简体   繁体   中英

Apache php httpd-xampp.conf alias not working

I have httpd-xampp.conf with

<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>

an in examples folder i have index.html, but when i access http://localhost:8880/examples , i have error

This page was not found

You are not logged in.

Back Log in Issues

Is there any error of my config? other alias : phpmyadmin, security work well.

I change httpd-xampp.conf to

<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>

and http://localhost:8880/my-examples work now

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM