Why can't I access Xampp's phpmyadmin on localhost? Access is forbidden.

前端 未结 3 1629
北荒
北荒 2020-12-15 09:23

I can access localhost fine on Xampp with phpmyadmin on ubuntu. I can see the contents of /htdocs which I completely cleared and wrote my own for. I want to access phpmyad

相关标签:
3条回答
  • 2020-12-15 09:35

    I solved this by creating a new virtual host for phpmyadmin

    For windows systems:

    Append the following to C:/xampp/apache/conf/httpd.conf:

    NameVirtualHost phpmyadmin.local
    
    <VirtualHost phpmyadmin.local>
      ServerName phpmyadmin.local
      DocumentRoot "C:/xampp/htdocs/phpmyadmin"
      <Directory "C:/xampp/htdocs/phpmyadmin">
        AllowOverride All
        Allow from All
      </Directory>
    </VirtualHost>
    

    Change the DocumentRoot/Directory to the path where you have installed your version of phpmyadmin.

    Open the C:\Windows\System32\drivers\etc\hosts file in a text editor and add the following line:

    127.0.0.1     phpmyadmin.local
    

    then save the hosts file and restart xampp.

    0 讨论(0)
  • 2020-12-15 09:50

    The solution can be found here. Summary follows:

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

    Add the line Require all granted to the bottom of the <Directory "/opt/lampp/phpmyadmin"> block as follows:

    <Directory "/opt/lampp/phpmyadmin">
      AllowOverride AuthConfig Limit
      Order allow,deny
      Allow from all
      Require all granted
    </Directory>
    
    0 讨论(0)
  • 2020-12-15 09:55

    Try this

    New XAMPP security concept

    Search in httpd-xampp.conf

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

    Replace with or remove phpmyadmin

    <LocationMatch "^/(?i:(?:xampp|security|licenses|webalizer|server-status|server-info))">
            Require local
        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
    </LocationMatch>
    
    0 讨论(0)
提交回复
热议问题