**I have this code:**

```
server {
    listen       80;
    server_name  example.com;
    return       301 https://www.sajufortune.com$request_uri;
}

server {
    listen       80;
    server_name  www.example.com;
    if ($http_x_forwarded_proto != 'https') {
        rewrite ^ https://$host$request_uri? permanent;
    }

    set $alb internal-saju-alb-before-w43.us-west-2.elb.amazonaws.com;

    location / {
        proxy_pass $alb;
    }
}

server {
    listen       80;

    location /ping/ {
        return 200 'pong';
    }
}

```

I got this returning 200 code from [here](https://serverfault.com/questions/196929/reply-with-200-from-nginx-config-without-serving-a-file):

I want to 200 response `pong` to `/ping/` request from any url except `example.com`, `www.example.com`.

How can I do this?