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 object is only available from the local network. This setting can be configured in the file "httpd-xampp.conf".
I tried this post but with no luck. please help. I am opening it from my own PC not from any other network.
This question is related to
phpmyadmin
xampp
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
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.
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. :)
On Xampp 5.6.3 Windows Path C:\xampp\apache\conf\extra\httpd-xampp.conf comment in this: #Require local
New XAMPP security concept ... #Require local ...
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/
Hey, use these section of code.
Path for xampp is: apache\conf\extra\httpd-xampp.conf
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Allow 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/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
Not need to change all config in file /opt/lampp/etc/extra/httpd-xampp.conf.
The only thing you need to change is the Require local
It's kinda obvious what Require local means so just change to Require all granted
Require all granted
Solution
from Require local
to Require all granted
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
after putting "Allow from all", you need to restart your xampp to apply the setting. thanks
Source: Stackoverflow.com