Can't access apache through network

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Can't access apache through network

Postby Todi » 03. November 2011 00:54

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!
Todi
 
Posts: 6
Joined: 02. November 2011 16:39
Operating System: Windows 7

Re: Can't access apache through network

Postby Sharley » 03. November 2011 01:25

What address are you typing in the browser to access XAMPP components from your network?
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Can't access apache through network

Postby Todi » 03. November 2011 02:09

the name of my server, "lazarus" on port 8080, like that: lazarus:8080. am i have to use the fixed ip of my server?
Todi
 
Posts: 6
Joined: 02. November 2011 16:39
Operating System: Windows 7

Re: Can't access apache through network

Postby Sharley » 03. November 2011 02:14

Yes unless you have defined lazarus:8080 in your DNS.

What is the IP you would use?
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Can't access apache through network

Postby Todi » 03. November 2011 05:02

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 ?
Todi
 
Posts: 6
Joined: 02. November 2011 16:39
Operating System: Windows 7

Re: Can't access apache through network

Postby Sharley » 03. November 2011 06:40

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. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Can't access apache through network

Postby Todi » 03. November 2011 14:12

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.
Todi
 
Posts: 6
Joined: 02. November 2011 16:39
Operating System: Windows 7

Re: Can't access apache through network

Postby Sharley » 03. November 2011 23:50

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?
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Can't access apache through network

Postby Todi » 04. November 2011 15:20

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.
Todi
 
Posts: 6
Joined: 02. November 2011 16:39
Operating System: Windows 7

Re: Can't access apache through network

Postby Sharley » 04. November 2011 22:32

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.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Can't access apache through network

Postby Todi » 05. November 2011 04:35

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!
Todi
 
Posts: 6
Joined: 02. November 2011 16:39
Operating System: Windows 7

Re: Can't access apache through network

Postby Sharley » 05. November 2011 04:42

Well http://grindlabs.servegame.com:8080 still does not work from where I sit.

It still shows the 403 error.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 135 guests