Check Port 80 for sites - port

I need to check if port 80 is up for the accessing IP.
I have tried
$checkport = #fsockopen($ip, $port, $errnum, $errstr, 2); //The 2 is the time of ping in secs
This is giving a result. But recently I have found that port 80 is up for access from normal connection is also returning as Port 80 up.
Reason I found was : ISP had enabled port80 for those accessing my site.
Can anyone help me out in this regards.
Thanks in advance.
Adarsh

Related

Can't connect to port 8080 using TIDHttp

Using Delphi 11.
I have two http servers running on my machine ; one on 80 port and other on 8080 .
I can sucesfully use TIDHttp to connect on the 'regular' server on 80 port, like so :
idhttp1.get('localhost');
But when i try to do the same with the server on 8080 port :
idhttp1.get('localhost:8080');
It raises the excepction "Unknown Protocol".
I can connect on both server directly on Chrome using the same addresses. What am i missing , please ?
Thanks
After i posted the question, i figured out.
Instead of
idhttp1.get('localhost:8080');
I needed to use
idhttp1.get('http://localhost:8080');

docker instance bridge with 9000 port, use 127.0.0.1:9000 can connect but 192.168.1.145:9000 connect fail,why?

I use one cloudy server with two ether card,like this ,and i have run one docker instance with net bridge, listen on 9000;like this
but now I can visite with http://127.0.0.1:9000 ,but can't visit with http://192.168.1.145:9000 like this . then I use another server at the same local network,
at that server ,I can visite with http://192.168.1.145:9000 ;
I don't know why? and I hope somebody can resole question. thank you!

How to hide my website port number?

I've been able to map www.xyz.com sub domain name to some ip port where port is not the default http port 80 but e.g. 1234
Entering www.xyz.com in browser works but resolves to www.xyz.com:1234
Please bear with me if my question sounds silly as am no expert of the networking domain.
Is that possible to keep port to non-default without it appearing with sub domain name in browser address bar?
Browser will show non-standard ports. However there are some workarounds depending on your tech stack:
You can have a redirect from port 80 (or 443) to port 1234.
For example in AWS you can have a Load Balancer that redirects traffic
from port 80 to 1234. The user in his browser will see no port.
You can have a Reverse Proxy with a rewrite rule.
Check here:
Rewrite rule to hide port from URL of Rails server?
No, this is not possible. Browsers always show non-default port numbers.
No, it's not possible to hide "1234" port number from your url.
Because:
For "http" url, browser only hides "80" port number.
For "https" url, browser only hides "443" port number.

Ubuntu server - port forwarding

I need to redirect http port 80 to port with specific page, which running on port 9090/somepage.
So in short:
Need redirect x.x.x.x:80 -> x.x.x.x:9090/page
I tried to do by command iptable, but I not be able to redirect port to specific port and page (only port to another port).
Please how I can realize this?
You probably need an proxypass in the virtualhost to redirect it. For Apache:
https://httpd.apache.org/docs/current/mod/mod_proxy.html

Spray on AWS Bind to localhost/127.0.0.1:80 failed

I have set up everything for spray on my AWS instance.
I am also able to run the sample spray-template successfully.
But the issue is spray-template uses port 8080 to bind when I change port from 8080 to 80.
I am facing below mentioned error.
Bind to localhost/127.0.0.1:80 failed
Below is line from my Boot.Scala file
IO(Http) ? Http.Bind(service, interface = "localhost", port = 8080
Can anyone help me with this?
Thank You.

Resources