nginx not running
-
I installed evok on rpi4 with buster. One wire, websocket runs ok but I am unable to run the control panel due to nginx problems.
● 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 Thu 2020-02-27 10:18:03 CET; 46s ago Docs: man:nginx(8) Process: 11233 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE) Feb 27 10:18:03 raspberrypi systemd[1]: Starting A high performance web server and a reverse proxy server... Feb 27 10:18:03 raspberrypi nginx[11233]: nginx: [emerg] invalid port in upstream "localhost:" in /etc/nginx/sites-enabled/evok:2 Feb 27 10:18:03 raspberrypi nginx[11233]: nginx: configuration file /etc/nginx/nginx.conf test failed Feb 27 10:18:03 raspberrypi systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE Feb 27 10:18:03 raspberrypi systemd[1]: nginx.service: Failed with result 'exit-code'. Feb 27 10:18:03 raspberrypi systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Any idea how to fix it without reinstalling evok?
-
Hello @juntiedt,
it seems that the evok site configuration file has not a valid content.
- What version of Evok are you running?
- Did you follow the installation guide on Evok github page (section Legacy installation process using a shell script)? Note that the .deb package installation is not available for Unipi1.1[lite].
- Can you send us the content of your /etc/nginx/sites-enabled/evok file?
-
requested file /etc/nginx/sites-enabled/evok file:
installation legacy with script as on git hub
installation 2 weeks ago
upstream evok { server localhost:; } server { listen default_server; server_name _; #ssl on; #ssl_certificate /etc/nginx/democert.pem; #ssl_certificate_key /etc/nginx/democert.key; #access_log /var/log/evok.access.log; access_log off; root /var/www/evok; location / { index index.html; } location /favicon.ico { alias /var/www/evok/favicon.ico; } location /ws { proxy_pass http://evok; proxy_set_header Host $host:$server_port; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_buffering off; proxy_cache off; proxy_read_timeout 180; } location /rest { proxy_pass http://evok; proxy_set_header Host $host:$server_port; } location /json { proxy_pass http://evok; proxy_set_header Host $host:$server_port; } location /bulk { proxy_pass http://evok; proxy_set_header Host $host:$server_port; } location /rpc { proxy_pass http://evok; proxy_set_header Host $host:$server_port; } }
-
OK, now it is a bit clearer. You probably did not insert TCP port while you have been asked for it during the installation process. Default values within the file are:
upstream evok { server localhost:8080; } server { listen 80 default_server; server_name _; #ssl on; #ssl_certificate /etc/nginx/democert.pem; #ssl_certificate_key /etc/nginx/democert.key; #access_log /var/log/evok.access.log; access_log off; root /var/www/evok; location / { index index.html; } location /favicon.ico { alias /var/www/evok/favicon.ico; } location /ws { proxy_pass http://evok; proxy_set_header Host $host:$server_port; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_buffering off; proxy_cache off; proxy_read_timeout 180; } location /rest { proxy_pass http://evok; proxy_set_header Host $host:$server_port; } location /json { proxy_pass http://evok; proxy_set_header Host $host:$server_port; } location /bulk { proxy_pass http://evok; proxy_set_header Host $host:$server_port; } location /rpc { proxy_pass http://evok; proxy_set_header Host $host:$server_port; } }
-
Hi Martin,
thanks for your help and support.
All running again!regards Hannes