3

I am using xampp and I tried to share my localhost with another computer with the same network.Everything works fine they can see my phpmyadmin and the website I made. The problem is when I try to run another website in my computer it gives me this error.

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

Error 403

localhost Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.5.19

I am just confuse with this one if it is still okay to run another website in my computer after sharing my localhost to another computer.

Here is my http-xampp

Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
<Directory "C:/xampp/phpMyAdmin">
    AllowOverride AuthConfig Limit
   Order allow,deny
   Allow from all
    Require all granted
</Directory>

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|

server-info))">
         Require all granted

    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

Can somebody help me?

2 Answers 2

0

Look in your XAMPP installation directory under {YOURDIR}/apache/conf/extra, and edit the file httpd-xampp.conf

Near the bottom you should see something like:

<LocationMatch "^/(?i:(:xampp|security.......
   Order deny,allow
   Deny from all
   Allow from ::1 127.0.0.0/8 \ ....
       .... \
       .... 

   ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

Simply change the line(s) that make up the Allow from .... section to be Allow from all

1
  • my http-xampp.conf is posted above and it works if I share to another pc and the problem is I cannot access another website in localhost
    – aiai
    Commented Jun 4, 2015 at 6:03
0

I solve this my editing my httpd.conf.

Find this in your directory, for me I found this is in C:/xampp/apache/conf/httpd

Find this in httpd.conf :

 DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs/someFolder">

remove the someFolder because this is the one that cause the error.This means that it will not accept any projects in htdocs except for someFolder.So it is need to remove this one.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .