I'm doing some tests with Nginx and I'm trying the error below when I try to start, how do I solve this?
systemctl start nginx
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
Output to the command systemctl status nginx.service
:
nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2018-06-16 18:35:03 -03; 53s ago
Process: 4584 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
Process: 4582 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
jun 16 18:35:03 localhost.localdomain systemd[1]: Starting The nginx HTTP and reverse proxy server...
jun 16 18:35:03 localhost.localdomain nginx[4584]: nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permis>
jun 16 18:35:03 localhost.localdomain nginx[4584]: 2018/06/16 18:35:03 [warn] 4584#0: could not build optimal types_hash, you should increase either >
jun 16 18:35:03 localhost.localdomain nginx[4584]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
jun 16 18:35:03 localhost.localdomain nginx[4584]: 2018/06/16 18:35:03 [emerg] 4584#0: mkdir() "/var/lib/nginx/tmp/client_body" failed (13: Permissio>
jun 16 18:35:03 localhost.localdomain nginx[4584]: nginx: configuration file /etc/nginx/nginx.conf test failed
jun 16 18:35:03 localhost.localdomain systemd[1]: nginx.service: Control process exited, code=exited status=1
jun 16 18:35:03 localhost.localdomain systemd[1]: nginx.service: Failed with result 'exit-code'.
jun 16 18:35:03 localhost.localdomain systemd[1]: Failed to start The nginx HTTP and reverse proxy server.