WebApp accessible via localhost but not 127.0.0.1 - jetty

i'm running a webapp on Jetty with Maven on my machine (Win7 pro X64) and i'm experiencing some weird problems:
when i try to open it on my browser - it's accessible via localhost but not 127.0.0.1 or my local address (192.168.0.14).
when someone else from my local network tries to access the app he can do it via my computer name but not via my local address.
NOTE:
ping works for localhost and 127.0.0.1. also, i can access 127.0.0.1 (80) with telnet.
windows firewall is off (stopped the service)
nothing defined in hosts file
cleaning DNS and ARP chache didn't help
on other computers in the network the app works fine and i can access it via their ip. we all share the same pom.xml.
error says - "link appears to be
please help me find out what the hell can be the problem
thanks...

after a looong evening of trying pretty much everything i think i found the problem - Skype!
after running jetty successfully on 8080 i consulted a friend and he told me about the skype issue. after shutting down skype, jetty runs perfectly on port 80 as well :)
after a quick search i found this - http://www.mydigitallife.info/disable-skype-from-using-opening-and-listening-on-port-80-and-443-on-local-computer/
NOTE: for some reason Jetty isn't throwing an exception like a server should in this situation

If you are getting genuine 404 errors, then you are obviously connecting to the Jetty server, but Jetty is deciding not to serve up your application on that address.
It sounds like you've enable virtual hosting on the Jetty server, so that the application is bound only to specific host names, and is therefore not being served up on numeric IP addresses.
I'm not sure how you've wound up in that situation though.

Related

I can access the website locally but can't access it through the internet After openning the port

I want to make my phone a Linux web server, by using the userLand application which gives you the ability to use ubuntu distribution on Andriod.
I already installed Django and ran my server on port 8080 since port 80 is busy (seems logical that android is using it)
and everything is good, it works when I try to access the website from another device on the local network.
so I proceeded to the next step which is making the website accessible from all over the internet then I found that you need to make a port forwarding on the router to allow devices from outside the local network to access a device in the localnetwork .
I followed the following steps :
made the phone's IP static locally
added the configuration needed for the port forwarding (phone's ip, port 8080, etc... )
found the public IP for my phone and used it and with port 8080
it is still not working:
I can access the website locally but can't access it through the internet.
I tried another method by using an already working server from the "AWebServer" application on google play
but still the same problem.
I tried temporarily to disable the firewall on the router but still the same problem
and finally, I tried to open the port on my laptop with OS: Windows 10
instead of the phone OS: Android, and checked with port checker but the port is closed and still the same problem.
I have been trying to solve this for a whole day)), I would be very happy if someone helped me.
thanks
first image
second image
Your ISP might have put you under a NAT, in that case port forwarding might still not work.
Your best bet is to use some sort of SSH Tunnels.
You can try with ngrok.
This will give you a URL to access your application from public internet.
Only caveat here is that ngrok is not free. They have a subscription based model. In the free tier, you can use ngrok but the link url changes after few hours.
If you want to, you can also implement something like ngrok for yourself. Read about ssh tunneling more. This will help you.

How do I link an already existing domain to a Windows Server 2019 VPS

I have a Django project running with Nginx and Waitress on my Windows VPS. I want to make it accessible to the public with a domain name. I am completely clueless on how to go about it, although I have pointed my domain's A record to the Public IP address of the VPS. To be specific, I am running a Windows Server 2019 on the Gcloud platform.
Check and make sure your VPS firewall settings are such that it allows request from public site at Port 80.
I just found a way to do it. I edited my Windows Server 2019 VPS firewall and added a port inbound rule, enabling request from remote clients on port 80 which is the port my nginx server serves from. #AnirudhBargi i guess i didn't understand your initial question. Enabling port 80 to accept request was the solution all along. Thank you very much.

REST calls not working on AWS with localhost?

I'm running a Spring application on an AWS box. The app is being hosted with Tomcat 8 and the build is running great. However, the calls we are making to the back don't work using localhost but do work when we use the ip instead.
Shouldn't we be able to use localhost instead of the ip? Is this a configuration issue with Tomcat 8 on our box and if so, what do we need to fix?
One reason can be a configuration issue in Tomcat, however, i think there is a higher probability of a missing configuration on the machine itself. I guess this is a Linux box, maybe a line missing in /etc/hosts (like the one below)?
127.0.0.1 localhost

Host a website using Wamp server for global access not just local

How can I tweak my wamp server to host a website to the world?
I've been searching everywhere, but I can't seem to find the answer. All I find are post telling me to host locally to 127.0.0.1, but I cant find any post on how to broadcast the site globally.
I'm familiar with hosting a site on iis7.0, but now that I setup a wamp server I cant figure it out. I use dnsExit to point my domains to a dynamic ip address that stays auto-updated thanks to a dns exit ip updater program.
Can anyone please tell me step by step what do I have to do to broadcast a site to the world using a wamp server for windows 2008 server edition.
Make sure port 80 is open on your firewall and also port forwarded on your router to your PC. That should be it.
To test, browse to your external IP address. You should see your site.

Django: external access

I have been setting up a Django website using the development server, and it works fine if I access it using the following address in my browser:
localhost:8000
I now want to be able to access the website from another computer (on the same network). I still want to use the development server for now. If my computer's name on the network is myname, and the domain is mydomain.com, then how can I enable this? If I just type in:
myname.mydomain.com:8000
I get a Server not found error.
Thanks.
It's not possible to access your computer like they way you explained in a LAN. There are couple of ways you can let other computers use your dev server directly.
First, run your Django app like this -
$ ./manage.py runserver 0.0.0.0:8000
So that the server listens to all the network interfaces for anyone accessing your IP, not just localhost. Then -
Find out your IP in the network. In the other computer in the same network open the hosts file(In linux, it's at /etc/hosts) and enter a new line -
enter.your.ip.here intended.domainname.com
Then you can access your dev server from that computer by entering intended.domainname.com:8000 or enter.your.ip.here:8000 in the browser. Cons: You have to alter the hosts file in each of the computer you intend to use the domain name instead of IP from and they all have to be in the same network.
You could use localtunnel. Then you can just execute -
$ localtunnel 8000
And it'll give you an url like http://xyz.localtunnel.com which you can share to anybody using the Internet and they'll be able to use your dev server.