Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

web server works on internet but not on LAN

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
7 posts • Page 1 of 1
mirza786
Posts: 7
Joined: Mon May 04, 2015 5:59 pm

web server works on internet but not on LAN
  • Quote

Post by mirza786 » Mon May 04, 2015 6:57 pm

Hello Everyone

I have configured web server. it works perfectly on internet but it does not open websites when i tried to open them from the same network on which server is configured E.g webserver is on IP 192.168.1.4 but when i tried to access hosted website on the same computer(server) it asked for username and password, i do not why. Even i tried to access it from another pc IP 192.168.1.8 of the same network. There was no result.

When i used browserstack website to test my website hosted on my server with the help of virtual machine interface provided by browser stack it was working smoothly.

i even allowed outgoing traffic for port 80 but still it is not working :(

Please help me to resolve this problem :)

Thanks
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: web server works on internet but not on LAN
  • Quote

Post by skurudo » Tue May 05, 2015 1:26 pm

Have you try something like ping your IP? It's worked? Then telnet may be?
Top

mirza786
Posts: 7
Joined: Mon May 04, 2015 5:59 pm

Re: web server works on internet but not on LAN
  • Quote

Post by mirza786 » Tue May 05, 2015 5:26 pm

yes when i pinged my webserver ip (192.168.1.4) from another machine( 192.168.1.8 ) i got reply from both sides.
when my hosted website can work on internet why it does not work on the same server machine, it is bit confusing
it is like whole world can access my websites exclude me
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: web server works on internet but not on LAN
  • Quote

Post by skurudo » Tue May 05, 2015 5:33 pm

And when you make telnet on port 80 from local network, you get positive response?
Top

mirza786
Posts: 7
Joined: Mon May 04, 2015 5:59 pm

Re: web server works on internet but not on LAN
  • Quote

Post by mirza786 » Fri May 08, 2015 11:51 am

Hello skurudo
thanks for supporting me

i did telnet to my server from LAN in three different ways
when i used cmd to telnet

Method 1:
telnet 192.168.1.4
i got error related to port 23

Method 2:
telnet 192.168.1.4 80
it neither displayed any process of connecting to server when i disconnected ctrl+z, it has given an error:
HTTP/1.1 400 Bad Request
Server: nginx
Date: Fri, 08 May 2015 11:33:03 GMT
Content-Type: text/html
Content-Length: 166
Connection: close

<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html>
Connection to host lost.

Method 3:
telnet mydomain.xyz.com 80
I tried to connect to my server using telnet using hostname from LAN
it returned me similar error which got in Step 2
Top

armandino
Posts: 8
Joined: Fri Nov 21, 2014 10:25 am

Re: web server works on internet but not on LAN
  • Quote

Post by armandino » Fri May 08, 2015 8:29 pm

let me guess. u host website on internal ip and forward ports from outside to inside via router right ?
so if u type ip_of_ur_server in browser what u get?
can u logged into your panel on your internal ip?
did u allow access in firewall from your lan subnet?
Top

mirza786
Posts: 7
Joined: Mon May 04, 2015 5:59 pm

Re: web server works on internet but not on LAN
  • Quote

Post by mirza786 » Sat May 09, 2015 10:41 am

everything was working fine expect LAN. yes, i was able to access the vesta control panel with internal ip. Moreover, i have already allowed all the traffic by making changes to firewalls. only the problem was i was not able to access my hosted websites on LAN which were working fine on WAN.

But the good thing is i have got the solution and i implemented it and it WORKS. Actually it was all due to internal DNS because when i was accessing websites from WAN it resolves the domain name to ip by using dns of my domain name service provider but in LAN it was not able to resolve due to lack of records. So i just added dns records to etc/hosts and it is working.

another LAN machines are also able to open websites just by adding dns ip to them.

Thankyou armandino & skurudo
Top


Post Reply
  • Print view

7 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password