nginx -V
nginx version: nginx/1.12.1
built by gcc 6.3.0 20170516 (Debian 6.3.0-18)
built with OpenSSL 1.1.1-dev xx XXX xxxx
TLS SNI support enabled
configure arguments: --prefix=/usr/local/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 --user=www-data --group=www-data --with-threads --with-file-aio --with-http_ssl_module --with-openssl=/home/sysadmin/src/openssl --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-stream --with-stream_ssl_module
uname -a
Linux gateway 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23) x86_64 GNU/Linux
nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
С конфигами всё ок.
service nginx stop
service nginx start
service nginx reload
Работает
-- Unit nginx.service has begun starting up.
Feb 14 09:39:50 gateway nginx[62628]: Starting nginx:
Feb 14 09:39:50 gateway systemd[1]: nginx.service: Control process exited, code=exited status=1
Feb 14 09:39:50 gateway systemd[1]: Failed to start LSB: starts the nginx web server.
-- Subject: Unit nginx.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit nginx.service has failed.
--
-- The result is failed.
Feb 14 09:39:50 gateway systemd[1]: nginx.service: Unit entered failed state.
Feb 14 09:39:50 gateway systemd[1]: nginx.service: Failed with result 'exit-code'.
Feb 14 09:39:52 gateway systemd[1]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: https://www.debian.org/support
И да, в логах nginx чисто.
Для systemctl всё аналогично.