nginx wont restart - errors - nginx

after trying nginx -t
and service nginx restart or nginx -s reaload I have found fallowing errors. Any idea how to fix them? Thank you for answers.
nm#srv:/etc/nginx/sites-available$ nginx -s reload
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
2015/08/03 09:12:35 [warn] 13513#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
2015/08/03 09:12:35 [warn] 13513#0: conflicting server name "venusfactorfreetrial.sandbox.modpreneur.com" on 0.0.0.0:80, ignored
2015/08/03 09:12:35 [notice] 13513#0: signal process started
2015/08/03 09:12:35 [alert] 13513#0: kill(1031, 1) failed (1: Operation not permitted)
nm#srv:/etc/nginx/sites-available$ nginx -t
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
2015/08/03 09:16:02 [warn] 13565#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
2015/08/03 09:16:02 [warn] 13565#0: conflicting server name "venusfactorfreetrial.sandbox.modpreneur.com" on 0.0.0.0:80, ignored
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
2015/08/03 09:16:02 [emerg] 13565#0: open() "/run/nginx.pid" failed (13: Permission denied)
nginx: configuration file /etc/nginx/nginx.conf test failed

Just do sudo service nginx reload

Related

nginx: [emerg] mkdir() "/var/cache/nginx/client_temp" failed (13: Permission denied)

Facing following issue while deploying nginx image on OpenShift?
can someone please help?
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: can not modify /etc/nginx/conf.d/default.conf (read-only file system?)
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2022/11/16 12:19:39 [warn] 1#1: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:2
nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:2
2022/11/16 12:19:39 [emerg] 1#1: mkdir() "/var/cache/nginx/client_temp" failed (13: Permission denied)
nginx: [emerg] mkdir() "/var/cache/nginx/client_temp" failed (13: Permission denied)

nginx: configuration file /etc/nginx/nginx.conf test failed WHY?

Why is the error occurring?
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
2021/05/21 09:12:03 [warn] 1079#1079: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
2021/05/21 09:12:03 [emerg] 1079#1079: a duplicate default server for 0.0.0.0:80 in /etc/nginx/sites-enabled/goodrpi.com:22
nginx: configuration file /etc/nginx/nginx.conf test failed

get_name:no start line:Expecting: TRUSTED CERTIFICATE

I have already written "TRUSTED CERTIFICATE" and "END TRUSTED CERTIFICATE" in my text file but an error occurred.
nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
nginx: [emerg] PEM_read_bio_X509_AUX("/etc/ssl/certs/surveyspan.crt") failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)
nginx: configuration file /etc/nginx/nginx.conf test failed

Nginx server is not running in centos7

The below error is coming while run the command sudo nginx -t
how can i get resolve out this problem?
nginx: [emerg] BIO_new_file("/etc/ssl/certs/bc0caaf684d122e1.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/ssl/certs/bc0caaf684d122e1.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

I cannot connect with the server ngnix: Unable to connect

I dont get any error message in
/var/log/nginx/error.log
I make sudo service nginx restart OK
My code in /etc/nginx/nginx.conf is => https://codeshare.io/q9Nr3
My code in /etc/nginx/sites-available/default is => https://codeshare.io/Rm7wP
When I executed my code in nginx -s reload
miguel#127:/$ nginx -s reload
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
2016/01/29 21:02:32 [warn] 3471#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
2016/01/29 21:02:32 [notice] 3471#0: signal process started
2016/01/29 21:02:32 [alert] 3471#0: kill(1154, 1) failed (1: Operation not permitted)
I put in my terminal sudo chmod -R 755 /var/log/nginx, but I dont get permissions

Resources