I've compiled nginx v1.9.6 from source on a debian(jessie v8.2) system. But it's not working as expected. Didn't have any problem with the 1.9.3 version.
when I try to run service nginx start
i get this message:
Failed to start nginx.service: Unit nginx.service failed to load: No such file or directory.
I used these arguments for configuration:
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --user=myuser --group=myuser --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_ssl_module --with-http_v2_module --with-file-aio --with-ipv6 --without-http_memcached_module
If you get the error message
Failed to start nginx.service: Unit nginx.service failed to load: No such file or directory.
systemd
has not found aunit file
.The installation from source did not provide a unit file. You need to create a unit file for nginx like this.
Adjust the paths to your installation and store the file under
/lib/systemd/system/nginx.service
. You need to runsystemctl daemon-reload
to reload systemd.Take a look at the official documentation for more information.