Access to the requested object is only available from the local network phpmyadmin

前端 未结 9 688
灰色年华
灰色年华 2020-12-13 00:29

I just installed xampp 1.8.0 for linux and when I opened phpmyadmin I got this error Access Forbidden!!

New XAMPP security concept:

Access to the requested objec         


        
相关标签:
9条回答
  • 2020-12-13 00:53

    I newer version of xampp you may use another method first open your httpd-xampp.conf file and find the string "phpmyadmin" using ctrl+F command (Windows). and then replace this code

    Alias /phpmyadmin "D:/server/phpMyAdmin/"
    <Directory "D:/server/phpMyAdmin">
        AllowOverride AuthConfig
        Require local
        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
    </Directory>
    

    with this

    Alias /phpmyadmin "D:/server/phpMyAdmin/"
    <Directory "D:/server/phpMyAdmin">
        AllowOverride AuthConfig
        Require all granted
        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
    </Directory>
    

    Don't Forget to Restart your Xampp.

    0 讨论(0)
  • 2020-12-13 00:55

    open your http.conf file

    vim /opt/lampp/etc/extra/httpd-xampp.conf
    

    Comment "Deny from all" in the following section,

    #
    # New XAMPP security concept
    #
    <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
            Order deny,allow
           #Deny from all
            Allow from ::1 127.0.0.0/8 \
                    fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
                    fe80::/10 169.254.0.0/16
    
            ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
    </LocationMatch>
    

    Edit:
    Try to add "Allow from all" before "ErrorDocument" line. Hope it helps.

    0 讨论(0)
  • 2020-12-13 00:59

    on osx log into your terminal and execute

    sudo nano /opt/lampp/etc/extra/httpd-xampp.conf
    

    and replace

    <Directory "/opt/lampp/phpmyadmin">
        AllowOverride AuthConfig Limit
        Require local
        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
    </Directory>
    

    with this

    <Directory "/opt/lampp/phpmyadmin">
        AllowOverride AuthConfig Limit
        Order allow,deny
        Allow from all
        Require all granted
        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
    </Directory>
    

    and then restart apache and mysql

    or use this command

     /opt/lampp/xampp restart
    
    0 讨论(0)
  • 2020-12-13 01:03

    If you see below error message, when try into phpyAdmin:

    New XAMPP security concept:
    Access to the requested directory is only available from the local network.
    This setting can be configured in the file "httpd-xampp.conf".
    

    You can do next (for XAMPP, deployed on the UNIX-system): You can try change configuration for <Directory "/opt/lampp/phpmyadmin">

    # vi /opt/lampp/etc/extra/httpd-xampp.conf
    

    and change security settings to

    #LoadModule perl_module        modules/mod_perl.so
    
    <Directory "/opt/lampp/phpmyadmin">
        AllowOverride AuthConfig Limit
        Order allow,deny
        Allow from all
        Require all granted
        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
    </Directory>
    

    First - comment pl module, second - change config for node Directory. After it, you should restart httpd daemon

    # /opt/lampp/xampp restart
    

    Now you can access http://[server_ip]/phpmyadmin/

    0 讨论(0)
  • 2020-12-13 01:04

    Adding to Sekar answer

    Don't forget to restart your XAMPP Server

    Update the accepted answer :

    now you need to comment Require local

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

    0 讨论(0)
  • 2020-12-13 01:05

    Nothing worked for me but following thing was awesome:

    1) Open

    httpd-xampp.conf

    which is at

    /opt/lampp/etc/extra/

    2) Find <Directory "/opt/lampp/phpmyadmin">

    3) Now just add Require all granted before

    4) So the code will look like this
    <Directory "/opt/lampp/phpmyadmin"> AllowOverride AuthConfig Limit Order allow,deny Allow from all Require all granted </Directory>

    5) Now finally Restart the xampp with this command /opt/lampp/lampp restart

    That's it and you are Done!

    It also work with xampp. :)

    0 讨论(0)
提交回复
热议问题