Localhost works only in my computer and not in my local network - html

Working on HTML/CSS/JS code. While i set up a localhost it works fine on my computer (the one hosting it) but i can't connect from any other computer on my network. I tryed (almost) everything and searched a lot throughout the last 3 days. I tryed XAMPP and MAMP but whatever i do i get the same error; "ERR_CONNECTION_TIMED_OUT" or "ERR_CONNECTION_REFUSED" (Chrome). Im new to programming and self-tought...so in many cases i did not know exactly what i have been doing... i followed tuttorials and articles about relevant subjects but nothing came out!
At this point, i'm not even sure if what im trying to do is even possible, but many people i came accross searching said it worked for them no-problem.
Also, strange thing; "localhost" seems to work fine on my computer, while "127.0.0.1" sometimes don't. IPv4 works fine allways.
EDIT Found the solution, it was just my firewall blocking the apache server -_- I am dumb. Thanks for the answers & help!

From my experience to access you're outputted code from a different computer on the same network use http://192.168.X.X where X.X is your server's local IP address. Should solve the issue. To get the ip of the computer its hosted on (permitting its windows) open up your cmd prompt and type "ipconfig" then you will get all of the neccesary ip info.

Yeah every localhost points to 127.0.0.1 that means the machine you are using.
In your lan you should find your LAN Address and access using it.
Depending on your scenario maybe you need to set some DNS Server.

Related

An Internal error occured error code 0x4 remote desktop connecting to google cloud Compute Engine VM

When tyring to login to RDP the "old" remote dekstop connection gave "an internal error occured"
And the new modern UI remote dekstop from windows store with version 10.2.1810.0 gave: error code 0x4 remote desktop
It seems a colleage has been logged in with wierd screen size. How can I resolve this without rebooting the machine?
I found a solution.
In the new GUI untick:
"Uppdatera fjärrsessionens upplösning vid storleksändring" in Swedish
Which translates to: Update the resolution of the remote session when resizing
Update remote sessions resolution when size change
Actually, even moving the port off 3389 doesn't help (for long)
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber
if there is an open port allowing RDP they will find it eventually and you will need to implement one of the above programs noted by Daniel. That was exactly my issue as well. You can usually tell if the problem is intermittent since it's just luck to get by the constant pounding on the open port...
For me, it was the graphic choice. No idea why but as I swap between the 4 options, only one works
I needed to set it to Highest Quality (32 bit)
However, I then restarted the server, and it no longer worked but True Colour (24 bit) did work! So, hopefully by toggling through each will get you through
In my case the cause was AVG Firewall blocking some RDP connections. I had to configure AVG Remote Access Module to allow RDP connections from some known IP addresses.
Hope this helps someone.
Looks like this error code pop up for many things... from screen resolution resize to colour depth to firewall and more... Which is quite odd. You have to check what is your specific case.
In my case, when I had problems with error code 0x4, it was related to unprotected RDP port.
In my case, it was caused by open, unprotected, RDP port 3389. As many would guess, this is a highly targeted port by bots. If your port is open to anyone in the internet, it's just a matter of time that your server or computer will be targeted.
The best solution would be to only allow connections from trusted IP addresses, the ones you use for connecting to your server.
Of course, that can't always be possible, so another solution would be something like the fail2ban utility used on many Linux servers.
The two solution I've found are EvlWatcher which is free and open source, and IPBan that have a free and open source version, but also a paid version.
You only need one of them, as they do the same thing. Do not install both. They will scan your logs and will temporary or permanently block any IP address with repeated fail connections. I suggest you always have your main IP address whitelisted, so you don't lock yourself out.
Best regards to you all.

Byethost web service won’t work. It won’t connect with the ftp server on port21

I tried to login to cpanel today and it’ll not let me. It won’t sync with a dreamweaver as well. Everything was working fine yesterday. I tried without antivirus and on other devices today. It says,”unable to connect to ftp server on port 21.”
It started working today. Looks like that was the servers fault. The servers didn’t support the port21 and ftp methods of connecting which is the only one that’s correct.

Can't log in to an app running on LocalHost - no network activity?

I'm working on an app with a team. They are able to log in fine when running it on their local servers, however when I try to do so I get 'Invalide username / password' and no network activity or console errors in dev tools.
I have no idea why this could be, we're working on the exact same code - clearly it's something on my machine.
Has anyone come across anything like this before?
(Have tried other browsers and still nothing).
Maybe you need to check your server instalation on your machine.
For example, if you are using XAMPP to manage your Apache maybe there is some configuration that was set in the wrong way.
My advice is, save your code and re-install your server, pay attention to all configuration details and see if the problem is solved.

Another user has left a localhost connection running I cannot stop

Forgive my vague wording on this (it is not my strong point).
Basically I am trying to run a site locally so in MACS host file I have set the URL to run locally and set the site up on MAMP.
This issue I am having is another user on this pc has left a connection running so when i look at any site locally it shows there site not mine.
They no longer work here so we do not have the password to access there account.
Is there a way to turn this off or overwrite this.
Once again
Sorry for vagueness
Thanks for any potential help in advanced.
David

Chrome now treating IP address of localhost same as somesite.localhost

For a while I have been running two different server environments on my Windows 7 OS. IIS runs on 127.0.0.1 and I have a Vagrant VM that uses 192.168.33.10. My hosts file looks something like:
vagrantsite1.localhost 192.168.33.10
vagrantsite2.localhost 192.168.33.10
iissite1.localhost 127.0.0.1
iissite2.localhost 127.0.0.1
Up until a week or so back, this setup worked perfectly fine, however something has changed recently with my Chrome browser. Now all of a sudden in Chrome when I access vagrantsite1.localhost it is referencing the IIS 127.0.0.1 IP address instead of 192.168.33.10. I checked this using chrome://net-internals/#dns and even cleared the host cache, which did not seem to resolve anything.
After some research I have found if I add localhost 192.168.33.10 to my hosts file, the vagrant sites work, however now my IIS sites try to access this IP instead of 127.0.0.1. It seems that Chrome does not let me use a different IP for somesite.localhost from localhost entry. This is not a problem in IE and Firefox, and up until recently it was not a problem in Chrome.
I was wondering if anyone else has this problem or a potential solution (rather than manually setting localhost IP each time I want to switch servers)? I realize I can use a different port number for one of the servers as a solution, however since everything works fine in IE and Firefox, and until recently worked fine in Chrome, I would like to know the cause.
This is a "feature" that was just added to chrome, all localhost domains will always resolve to loopback.
See the following links for more information:
https://code.google.com/p/chromium/issues/detail?id=455825
https://codereview.chromium.org/938093003
One workaround is to change your entries to not end in localhost, something like "vagrantsite1.local 192.168.33.10" instead should work.