我在端口81上运行了nginx。我可以使用telnet进行连接telnet 127.0.0.1 81,一切都很好。
但是,当我尝试从Mac(外部IP地址)远程登录到我的计算机时,只会出现以下错误:
telnet: connect to address 109.123.x.x: Connection refused
telnet: Unable to connect to remote host
这是我的/ etc / nginx / sites-available / default文件:
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;
        }
        ...
我已经打开Ubuntu防火墙(ufw)允许端口81。
我现在完全陷入困境。
谁有想法?