When we setup our project with docker, this line is missing in the nginx config. The xdebug extension in combination with PhpStorm doesn't recognize the connection without "server_name localhost".
We also call a powershell script to execute the script inside the container like this:
docker-compose exec -u root app /bin/sh -c bin/add_server_name.sh