Xampp: I cannot access phpMyAdmin from localhost

I tried to create a hampp for home development. It is installed correctly and I can access xampp pages like demos, security, status ... even using phytin-gui to start and stop the server.

But when it comes to phpMyAdmin access using ' http: // localhost / phpmyadmin ' I get the following error:

Access forbidden! 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". 

I checked my httpd-xampp.conf and it seems to be right. I tried to change the All prohibition to Allow, but it didn’t work.

My host files point localhost to 127.0.0.1, which is expected to be available for all xampp files.

I am running XAMPP 1.8.1 on an ubuntu 12.04 machine

Someone who had the same problem? I lost about 2 hours of browsing the Internet, but all I found is that this error occurs when trying to access the server from another network or machine. But for me the thing is that I work directly on the server, so he suggested that I can access phpMyAdmin by default.

My httpd-xampp.conf

 # # 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> 
+4
source share
4 answers

Go to the /opt/lampp/etc/extra directory if you installed XAMPP under /opt and edited httpd-xampp.conf to add Require all granted , as shown below:

 # since XAMPP 1.4.3 <Directory "/opt/lampp/phpmyadmin"> AllowOverride AuthConfig Limit Order allow,deny Allow from all Require all granted </Directory> 

You may need to restart the LAMPP server by running /opt/lampp/lampp restart .

+5
source

I also found this problem in my own XAMPP forum. Require all granted is mentioned, but it grants access unconditionally. Stream will continue to provide a better solution :

Just update your httpd-xampp.conf. Replace the end:

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

Then restart the lamp with: reboot sudo / opt / lampp / lampp

ref: http://httpd.apache.org/docs/2.4/mod/mod_authz_core.html#require

+2
source

I solved this by creating a new virtual host for phpmyadmin

Add 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 DocumentRoot/Directory to the path where you installed phpmyadmin version.

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

 127.0.0.1 phpmyadmin.local 

then save the hosts file and restart xampp .

fooobar.com/questions/440209 / ...

0
source

This answer applies to XAMPP 1.8.2 [PHP: 5.4.25]

Just put the # sign in front of the local requirement below, and, importantly, stop and start Apache in the xampp control panel. What is it, it definitely works

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

Source: https://habr.com/ru/post/1440843/


All Articles