66

I get following error when trying to access Xampp from a network I've tried but does not get any idea how to resolve it. Any help??I really confused

Access Forbidden :

Access to the requested Object is only available from the local network. This setting can be configured in the file "httpd-xampp.conf".

Community
  • 1
  • 1
karto
  • 3,538
  • 8
  • 43
  • 68
  • The error seems very self explanatory. Have you tried editing the `httpd-xampp.conf` file? – Chris Salij May 21 '11 at 17:31
  • 4
    yeah, but wondering what exactly to do there. – karto May 21 '11 at 17:41
  • Follow the link clear and concise http://yeslinux.blogspot.com/2012/07/new-xampp-security-concept-solved.html – Durai Amuthan.H Mar 25 '14 at 15:56
  • @ChrisSalij: No, it is not very self explanatory. It doesn't say whare the file is. Try to find it – Green Jun 13 '14 at 12:12
  • my advice: at the end of httpd-xampp.conf, remove 'xampp' such that you get : Require local ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var instead of # # Require local # ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var # now only you web/php pages are visible, and not the admin pages – reuns Oct 15 '15 at 12:59

3 Answers3

92

In your xampppath\apache\conf\extra open file httpd-xampp.conf and find the below tag:

# Close XAMPP sites here
<LocationMatch "^/(?i:(?:xampp|licenses|phpmyadmin|webalizer|server-status|server-info))">
    Order deny,allow
    Deny from all
    Allow from ::1 127.0.0.0/8 
    ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>

and add

"Allow from all"

after Allow from ::1 127.0.0.0/8 {line}

Restart xampp, and you are done.

In later versions of Xampp

...you can simply remove this part

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

from the same file and it should work over the local network.

Jazerix
  • 4,729
  • 10
  • 39
  • 71
Abhishek Jaiswal
  • 2,524
  • 1
  • 21
  • 24
41

This solution worked well for me: http://www.apachefriends.org/f/viewtopic.php?f=17&t=50902&p=196185#p196185

Edit /opt/lampp/etc/extra/httpd-xampp.conf and adding Require all granted line at bottom of block <Directory "/opt/lampp/phpmyadmin"> to have the following code:

<Directory "/opt/lampp/phpmyadmin">
  AllowOverride AuthConfig Limit
  Order allow,deny
  Allow from all
  Require all granted
</Directory>
Bat_Programmer
  • 6,717
  • 10
  • 56
  • 67
8

This answer is for XAMPP on Ubuntu.

The manual for installation and download is on (site official)

http://www.apachefriends.org/it/xampp-linux.html

After to start XAMPP simply call this command:

sudo /opt/lampp/lampp start

You should now see something like this on your screen:

Starting XAMPP 1.8.1...
LAMPP: Starting Apache...
LAMPP: Starting MySQL...
LAMPP started.

If you have this

Starting XAMPP for Linux 1.8.1...                                                             
XAMPP: Another web server daemon is already running.                                          
XAMPP: Another MySQL daemon is already running.                                               
XAMPP: Starting ProFTPD...                                                                    
XAMPP for Linux started

. The solution is

sudo /etc/init.d/apache2 stop
sudo /etc/init.d/mysql stop

And the restast with sudo //opt/lampp/lampp restart

You to fix most of the security weaknesses simply call the following command:

/opt/lampp/lampp security

After the change this file

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

Find and replace on

    #
# 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 
    Allow from all
    #\
    #   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>
Mirko Cianfarani
  • 2,023
  • 1
  • 23
  • 39
  • `/opt/lampp/lampp security ` is very useful after you setup XAMPP ! It'll take care of several default security issues: FTP account, PHPAdmin, Sqlite account – Dio Phung Jul 13 '14 at 12:45
  • I tried both of these solutions and neither resolved the error. After writing the changes to the file on the remote server, is there something else I need to do? – William Roberts Nov 17 '15 at 20:53
  • Relaunch xampp? What is the new error that you have now? – Mirko Cianfarani Nov 18 '15 at 01:03