I am not very familiar with configuring a web server. I have a node express server running on port 3000 on an AWS EC2 instance that is running Ubuntu 18.04.
In AWS management console, I have a rule allowing access to port 3000, so that I can access mydomain.com:3000
. No problem - that makes sense.
To enable access through mydomain.com
, I installed Nginx and a very simple configuration using proxy_pass to pass along port 80 requests to port 3000:
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name mydomain.com www.mydomain.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:3000;
}
}
However, when I stop Nginx (which I did as part of an unrelated attempt to move to https...more details on that if you need), I can still access mydomain.com
.
Somehow, the node express server on port 3000 is being reached, even though traffic is coming in to port 80. And Nginx is not running.
What is happening?
I checked sudo iptables -L
and that does not appear to be the culprit:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination