Nginx not starting

My raspberry pi, does not boot into desktop. When i checked the log files of boot, I get the following messages from the kernal.I am operating my raspberry pi through ssh in headless mode.

Starting Avahi mDNS/DNS-SD Stack...

Starting dhcpcd on all interfaces...

Starting rng-tools.service...

Starting LSB: Switch to ondemand cpu governor (unless shift key is pressed)...

[ OK ] Started D-Bus System Message Bus.

Starting WPA supplicant...

[ OK ] Started Daily apt upgrade and clean activities.

[ OK ] Reached target Timers.

[ OK ] Started Regular background program processing daemon.

[ OK ] Started triggerhappy global hotkey daemon.

[ OK ] Started Save/Restore Sound Card State.

[ OK ] Reached target Sound Card.

[ OK ] Started Login Service.

[ OK ] Started System Logging Service.

[ OK ] Started Check for v3d driver.

[ OK ] Started dhcpcd on all interfaces.

[ OK ] Started rng-tools.service.

[ OK ] Started dphys-swapfile - set up, mount/unmount, and delete a swap file.

[ OK ] Started WPA supplicant.

[ OK ] Started Avahi mDNS/DNS-SD Stack.

Starting Authorization Manager...

[ OK ] Reached target Network.

Starting Daily apt download activities...

Starting OpenBSD Secure Shell server...

Starting A high performance web server and a reverse proxy server...

Starting Permit User Sessions...

Starting /etc/rc.local Compatibility...

[ OK ] Started Unattended Upgrades Shutdown.

[ OK ] Started LSB: OpenSprinkler Python.

[FAILED] Failed to start A high performance web server and a reverse proxy server.

See 'systemctl status nginx.service' for details.

[ OK ] Started /etc/rc.local Compatibility.

[ OK ] Started Permit User Sessions.

Starting Light Display Manager...

Starting Hold until boot process finishes up...

[ OK ] Started OpenBSD Secure Shell server.

[ OK ] Started LSB: Switch to ondemand cpu governor (unless shift key is pressed).

[ OK ] Started Authorization Manager.

[email protected]-CSIO:/home/pi# systemctl status nginx.service

● nginx.service - A high performance web server and a reverse proxy server

Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)

Active: failed (Result: exit-code) since Mon 2019-07-08 06:56:58 IST; 1min 13s ago

Docs: man:nginx(8)

Process: 425 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=203/EXEC)

Jul 08 06:56:58 IAQM-CSIO systemd[1]: Starting A high performance web server and a reverse proxy server...

Jul 08 06:56:58 IAQM-CSIO systemd[425]: nginx.service: Failed to execute command: No such file or directory

Jul 08 06:56:58 IAQM-CSIO systemd[425]: nginx.service: Failed at step EXEC spawning /usr/sbin/nginx: No such file or directoryJul 08 06:56:58 IAQM-CSIO systemd[1]: nginx.service: Control process exited, code=exited, status=203/EXEC

Jul 08 06:56:58 IAQM-CSIO systemd[1]: nginx.service: Failed with result 'exit-code'.

Jul 08 06:56:58 IAQM-CSIO systemd[1]: Failed to start A high performance web server and a reverse proxy server.

My nginx configuration is as follows

#Full path: /var/www/lab_app/lab_app_nginx.conf

server {
listen 80;
server_name localhost;
charset utf-8;
client_max_body_size 75M;

location /static {
root /var/www/lab_app/;
}

location / { try_files $uri @labapp; }
location @labapp {
include uwsgi_params;
uwsgi_pass unix:/var/www/lab_app/lab_app_uwsgi.sock;
}
}

 

cloudfart's picture

Check the nginx error log

You need to check the log files. Maybe you will find there the reason for it.

Vote the answer: 
0
No votes yet