Nginx fails to start - nginx.service not found

i just built the latest mainline nginx from source on fedora 21 (64bit)
and
when i run: service nginx start

i see:

Redirecting to /bin/systemctl start nginx.service
Failed to start nginx.service: Unit nginx.service failed to load: No
such
file or directory.

i’ve searched around online and so far found no-one else reporting the
same
issue.
i think i have fixed this before on another installation in the past…
but
presently i’m not sure what the resolutioin is - can anyone help?

Posted at Nginx Forum:

Hello,

On 20/03/2015 01:08, tunist wrote:

issue.
i think i have fixed this before on another installation in the past… but
presently i’m not sure what the resolutioin is - can anyone help?

Nginx source code does not contain a service file for systemd. You’re
free to re-use the one shipped in the official packages available on
nginx: Linux packages.

Also, it might be worth rebuilding an official source rpm package - the
fedora systemd support is in there, it’s just we don’t build those
packages specifically for fedora linux.


Konstantin P.

Konstantin P. Wrote:

Nginx source code does not contain a service file for systemd. You’re
free to re-use the one shipped in the official packages available on
nginx: Linux packages.

Also, it might be worth rebuilding an official source rpm package -
the
fedora systemd support is in there, it’s just we don’t build those
packages specifically for fedora linux.

oh, ok - thanks; i used this file from the nginx site and all appears to
be
ok now:
http://wiki.nginx.org/FedoraSystemdServiceFile

Posted at Nginx Forum: