ahmed gomaa
ahmed gomaa

Reputation: 1

nginx failed to start on centos 7 minimal

enter image description here[sudo] password for ahmed: ● nginx.service - The nginx HTTP and reverse proxy server Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Mon 2022-03-14 07:57:48 EDT; 11min ago Process: 19198 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE) Process: 19195 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS) Main PID: 1493 (code=exited, status=0/SUCCESS)

Mar 14 07:57:48 localhost.localdomain systemd2: Starting The nginx HTTP and reverse proxy server... Mar 14 07:57:48 localhost.localdomain nginx[19198]: nginx: [emerg] invalid number of arguments in "server_name" direct...nf:41 Mar 14 07:57:48 localhost.localdomain nginx[19198]: nginx: configuration file /etc/nginx/nginx.conf test failed Mar 14 07:57:48 localhost.localdomain systemd2: nginx.service: control process exited, code=exited status=1 Mar 14 07:57:48 localhost.localdomain systemd2: Failed to start The nginx HTTP and reverse proxy server. Mar 14 07:57:48 localhost.localdomain systemd2: Unit nginx.service entered failed state. Mar 14 07:57:48 localhost.localdomain systemd2: nginx.service failed. Hint: Some lines were ellipsized, use -l to show in full. [ahmed@localhost nginx]$enter image description here

[2]: https://i.sstatic.net/rEETE.png

Upvotes: 0

Views: 1124

Answers (1)

RaviTezu
RaviTezu

Reputation: 3125

It looks like your config(/etc/nginx/nginx.conf) has some errors in it. You can get more information about the errors by running the nginx -t command.

Upvotes: 0

Related Questions