Nginx config for mastodon doesn't work on local

I’m trying to run a mastodon instance on my home Ubuntu 20.04 server. So, I followed all the steps in the joinmastodon for installation.

In the end I got a nginx config for Mastodon in /etc/nginx/sites-enabled/mastodon.

I decided to test the website locally, so I replaced the 2 example.com parameters of server_name with 192.168.0.20. Also I commented out listen 443 ssl http2;
and listen [::]:443 ssl http2;.

Then I wrote in bash nginx -s reload, and got these erros

nginx: [warn] conflicting server name "192.168.0.20" on 0.0.0.0:80, ignored nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory)

You can find the full config here.

Is there a way I can run Mastodon locally on my computer with nginx? Any help is appreciated.

server_name parameter is used to route HTTP requests to “named” virtual hosts, so either it needs to be a hostname, or if this is the only one - just leave it out.