Nginx

The Primero application is served by the Nginx server. Shutting the server down halts the application.

Note that Nginx is an optional runtime dependency of CouchDB for situations where external syncing is employed (as it is in Sierra Leone). Where CouchDB and the Primero Ruby on Rails application are deployed on the same box, they will share an instance of Nginx.

Start $ sudo systemctl start nginx
Stop $ sudo systemctl stop nginx
Status $ sudo systemctl status nginx
nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2017-09-19 05:02:53 UTC; 10h ago
Process: 12520 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 12517 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 12523 (nginx)
Tasks: 3
Memory: 8.0M
CPU: 2.987s
CGroup: /system.slice/nginx.service
   ├─12523 nginx: master process /usr/sbin/nginx -g daemon on; master_process on
   ├─12524 nginx: worker process
   └─12525 nginx: worker process
Sep 19 05:02:53 primero-int-1-4 systemd[1]: Starting A high performance web server and a reverse proxy server...
Sep 19 05:02:53 primero-int-1-4 nginx[12517]: nginx: [warn] "ssl_stapling" ignored, issuer certificate not found
Sep 19 05:02:53 primero-int-1-4 nginx[12520]: nginx: [warn] "ssl_stapling" ignored, issuer certificate not found

`$ ps -fA \
grep nginx`
root 12523 1 0 05:02 ? 00:00:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
www-data 12524 12523 0 05:02 ? 00:00:02 nginx: worker process
www-data 12525 12523 0 05:02 ? 00:00:00 nginx: worker process
Log Files /srv/primero/logs/couchdb/nginx_server.log
/srv/primero/logs/couchdb/nginx_error.log
/var/log/nginx/access.log
Run User root, www-data