The problem I'm having trouble with is that I can't access remotely unless I use port 80 and I want to use a different port.

Here's the NGINX configuration I'm using. This will work on port 80. However, if I change

```
listen       80;

```

to

```
listen       6000;

```

it does not work when accessed from outside the local machine.

In other words, curl 127.0.0.1:6000 on the machine works. However trying to visit externally with 184.169.100.100:6000 does not work. (Pretending that's my public IP address.) It gives me a "site can't be reached" error in Chrome.

I've checked the security settings to make sure port 6000 is open. It's an AWS EC2 instance.

Optional note to put things in context: Overall what I'm trying to do is set up two different servers on one machine, each accessible from a different port, and each running it's own set of python workers. As a first step, I just want to make sure I can change the port by which a server is accessed, however, I'm not even able to do that yet and still access it externally.

```
ubuntu@ip-172-31-9-113:/etc/nginx/conf.d$ cat flask.conf
upstream gunicorn_server {

  server localhost:8080 fail_timeout=0;
}

    server {
        listen       80;
        server_name  184.169.100.100;

        root /home/ubuntu/www;
        client_max_body_size 4G;
        keepalive_timeout 5;
        proxy_read_timeout 900;

        location / {
        try_files $uri @app;
        }

        location @app {
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_set_header X-Real-IP     $remote_addr;
         proxy_set_header Host $http_host;
         proxy_redirect off;
        # pass to the upstream gunicorn server mentioned above
         proxy_pass http://gunicorn_server;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
   }

```

Any help is appreciated.