Page 1 of 1

Can't access apache through network

PostPosted: 03. November 2011 00:54
by Todi
Hello guys,

I have a problem with apache server when i try to access any site folder on htdocs, even the xampp main page. I get the 403 error every time i try to access htdocs from another pc on my network. The apache has installed in my home server and from there, i can access normally without errors.

Does anyone have an idea that what i'm doing wrong?

Thanks!

Re: Can't access apache through network

PostPosted: 03. November 2011 01:25
by Sharley
What address are you typing in the browser to access XAMPP components from your network?

Re: Can't access apache through network

PostPosted: 03. November 2011 02:09
by Todi
the name of my server, "lazarus" on port 8080, like that: lazarus:8080. am i have to use the fixed ip of my server?

Re: Can't access apache through network

PostPosted: 03. November 2011 02:14
by Sharley
Yes unless you have defined lazarus:8080 in your DNS.

What is the IP you would use?

Re: Can't access apache through network

PostPosted: 03. November 2011 05:02
by Todi
i've allowed the ports in the firewall, 8080 instead, and the ip address of my server is 192.168.1.2:8080. I tried here, but, not works. would you know another way ?

Re: Can't access apache through network

PostPosted: 03. November 2011 06:40
by Sharley
Open in your text editor \xampp\apache\conf\extra\httpd-xampp.conf file.

Down near the bottom of the file you will see this
Code: Select all
#
# New XAMPP security concept
#

# Close XAMPP security section here
<LocationMatch "^/(?i:(?:security))">
    Order deny,allow
    Deny from all
    Allow from ::1 127.0.0.0/8
    ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>

# 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>
Change the second section Close XAMPP sites here to look like this
Code: Select all
# 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 \
               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>
Save the file and restart Apache.

Now try your address 192.168.1.2:8080 again.

XAMPP is constructed by default to only allow access to the most security sensitive folders to only the localhost user who installed XAMPP on their PC not to LAN or WAN users.

Good luck. :)

Re: Can't access apache through network

PostPosted: 03. November 2011 14:12
by Todi
Thanks! This works! Now everything is working fine!
Now, if you can help me, how can i grant access through internet using no-ip? With this configuration that i have maded, i can't access my htdocs folder, the connection reset, like i didn't any site in my internet folder. My router/modem is an d-link 2640b and i made the configurations to allow port 8080 and DMZ access to my server ip, is have another config to do?

sorry about my english, it's really sucks!

thanks again.

Re: Can't access apache through network

PostPosted: 03. November 2011 23:50
by Sharley
I am please that your LAN now works. 8)



In XAMPP by default you will be able to access your web site if it has been placed in the htdocs folder and by using the correct address in the browser's address.

You say that you now use port 8080 so did you tell Apache to Listen on port 8080?

Why do you want to use port 8080 instead of the default port 80 as this could be confusing and cause issues for you?

What address are you typing in the address bar of your browser?

Re: Can't access apache through network

PostPosted: 04. November 2011 15:20
by Todi
Sharley wrote:You say that you now use port 8080 so did you tell Apache to Listen on port 8080?


Yes, i change the configs in the file httpd.conf, so now the apache listen on port 8080

Sharley wrote:Why do you want to use port 8080 instead of the default port 80 as this could be confusing and cause issues for you?


because my internet provider block the basic internet ports (80, 21, etc) so i have to bypass accessing it through another ports.

Sharley wrote:What address are you typing in the address bar of your browser?


i have created an no-ip account and registered this domain: http://grindlabs.servegame.com/, then as i am using port 8080 i have to access http://grindlabs.servegame.com:8080 but didn't work. appear the message the server doesn't respond even with the ports redirected to my server ip and allowed in my router.

Re: Can't access apache through network

PostPosted: 04. November 2011 22:32
by Sharley
You need to remove or rename the index.php and the index.html in the \xampp\htdocs folder.

That will remove the Access forbidden! New XAMPP security concept: 403 error.

Re: Can't access apache through network

PostPosted: 05. November 2011 04:35
by Todi
Sharley wrote:You need to remove or rename the index.php and the index.html in the \xampp\htdocs folder.

That will remove the Access forbidden! New XAMPP security concept: 403 error.


i dont do this, just put the full path to my test folder and it's works! :D
but, thanks! all works fine now!

Re: Can't access apache through network

PostPosted: 05. November 2011 04:42
by Sharley
Well http://grindlabs.servegame.com:8080 still does not work from where I sit.

It still shows the 403 error.