Too much time to get into port 80 after switching the port from custom port - networking

In the instance of AWS ec2,
I have nginx and apache web server.
And have four different domains.
One domain goes to apache through nginx ahead.
The other ones go to just nginx.
And those domains are listening port 8090 which is customized.
What I did was that I changed the port 8090 to 80 in each of conf files for nginx.
And it works but takes much time about 30 up to 1 minute ish to get to the port 80 at browsers and others such as curl.
With some computers, it says connection timed out.
I don't know why this is happening.
In aws environment, I've got ALB and NLB and when the port 8090 was set, it was running in NLB.
Can anyone help with this phenomenon?

Related

Telnet port 80 works but http browsing does not ... two different networks? What could this be?

I have a trivial Nginx site (just index.html) running on a GCP VM host.
I can telnet to port 80 but browsing this same address gives connection refused on three different networks.
I can't imagine what is going on ... help please?

accessing my local site from a remote computer

I have IIS 7.5 installed on my computer.
I have one site configured on it.
It has binding on port 80 with IP all unassigned.
I want to reach that site from a remote computer i.e. not inside the LAN.
I also configured port forwarding to my LAN IP but I still can't reach it.
Is there something else I need to do in order to achieve it?
telnet from computer to port 80 succeed but from a remote it doesn't succeed.
These are the configurations in my router:
10.0.0.2
External Port Start
1
External Port End
65000
Internal Port Start
80
Internal Port End
80
Ok - it was a problem with my router configurations:
I set port 80 for both external and internal and no I reached my computer

Nginx and iptables overlapping

I'm a little confused with nginx and iptables, I want to redirect all traffic to port 443 or port 8443 on my server, I also have mongodb running on port 27017, by blocking it, will I be able to access the database from my node.js app (which is running on port 8443)? should I use nginx to redirect or iptables? it seems that sometimes they overlap each other. So, which one is better to handle this?

Nginx long connection time

I have a nginx server running on port 80 which is serving static files, and is a proxy frontend for apache on port 8080 and varnish on port 6081.
The setup has been running fine for almost 16 months, and suddenly we started experiencing problems with the connection time to nginx on port 80.
The problem appears if you try telneting to port 80 it from the server itself, so I think it has nothing to do with the network. The problem appears once in every 10 connections, and stalls the connection about 5 seconds.
Any ideas what might be causing it?
It ended up being a syn flood attack, nothing to do with nginx. I sorted it with a iptables rule.

CouchDB port 80

Is it possible to run couchdb on port 80? I'm looking to host a couchapp from it and don't want my users to have to type a port number in the url.
When I change the port to 80 in the couchdb config it becomes unavailable, and I have no access to it on 80 or any other port. I have to change the port back in the local.ini file.
Is this not a recommended setup? Would I be better hosting behind a reverse proxy? If so, any tips on how to get it working behind an IIS reverse proxy? I tried that too using ARR and URL Rewrite, with no success.
EDIT:
First, this chapter of the CouchDB definitive guide seems to suggest it is ok to server web apps directly from couch. Curious what the community thinks:
http://guide.couchdb.org/editions/1/en/standalone.html
Second, I installed CouchDB on a second machine that does NOT have IIS installed on it and it ran on port 80 just fine, so I suspect that even though I've turned off all websites in IIS it is still hogging port 80. Any way to make IIS give up port 80?
Ok I figured it out. By default IIS listens for port 80 on ALL IPs. So it also grabs 127.0.0.1 and listens on port 80 there as well, EVEN IF YOU TURN OF ALL WEBSITES listening on 80.
To remedy this you need to add an IP address to the IP listen list. By default this list is empty and IIS decides to just listen to all IPs. But if you add an IP or IPs to this list IIS will only listen to those IPs.
First here's how you can see what IPs are in the listen list:
netsh http show iplisten
If the list is blank IIS is listening on all IPs. To add an IP to the list:
netsh http add iplisten XXX.XXX.X.XXX (where the X's are your IP)
Now IIS and CouchDB can exist together on port 80 in happiness, as long as they both have their own IP's to listen to.

Resources