I would like to receive advice for a solution.
There seems to be no problem with the nginx connection, but the error log shows the following error.
Since I am creating a test environment, I am accessing by IP address without setting a domain, but a not found error screen is displayed.(404 Not Found nginx/1.20.1)
[root@centos]# sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
error log
[root@centos]# sudo tail -f /var/log/nginx/error.log
2023/10/15 12:28:46 [emerg] 3163#3163: "server" directive is not allowed here in /etc/nginx/nginx.conf:1
2023/10/15 12:31:00 [emerg] 3175#3175: "server" directive is not allowed here in /etc/nginx/nginx.conf:1
2023/10/15 12:33:45 [emerg] 3185#3185: "server" directive is not allowed here in /etc/nginx/nginx.conf:1
2023/10/15 12:37:05 [emerg] 3198#3198: "server" directive is not allowed here in /etc/nginx/nginx.conf:1
2023/10/15 12:44:11 [emerg] 14359#14359: "server" directive is not allowed here in /etc/nginx/nginx.conf:1
2023/10/15 12:46:36 [emerg] 14381#14381: "server" directive is not allowed here in /etc/nginx/nginx.conf:1
2023/10/15 12:49:55 [emerg] 14429#14429: "server" directive is not allowed here in /etc/nginx/nginx.conf:1
2023/10/15 12:53:45 [emerg] 14449#14449: "server" directive is not allowed here in /etc/nginx/nginx.conf:1
2023/10/15 12:57:59 [emerg] 14467#14467: "server" directive is not allowed here in /etc/nginx/nginx.conf:1
2023/10/15 13:04:02 [emerg] 14492#14492: no "events" section in configuration