I have nginx running on port 81. I can telnet using telnet 127.0.0.1 81
and everything is fine.
But when I try to telnet to my machine from my Mac (an external IP address), I just get this error:
telnet: connect to address 109.123.x.x: Connection refused
telnet: Unable to connect to remote host
Here is my /etc/nginx/sites-available/default file:
server {
listen 81; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
root /usr/share/nginx/www;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name 109.123.x.x;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to index.html
try_files $uri $uri/ /index.html;
}
...
I've opened Ubuntu Firewall (ufw) to allow port 81.
I'm totally stuck now.
Anyone have any ideas?