get_name:no start line:Expecting: TRUSTED CERTIFICATE - nginx

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

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

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

Nginx permissions issue: www-data user can't open error log despite 766 permissions

I have an Ubuntu 14.04 server where nginx was originally installed by the root user. I now want to run nginx as a non-root user, a new user that I added to both the sudo the www-data groups. For now, I have yet to install an app server.
When I try to run nginx from this new user, I get the following message:
nginx: [alert] could not open error log file: open()
"/var/log/nginx/error.log" failed (13: Permission denied) 2016/08/09
22:07:52 [warn] 17609#0: the "user" directive makes sense only if the
master process runs with super-user privileges, ignored in
/etc/nginx/nginx.conf:1 2016/08/09 22:07:52 [emerg] 17609#0: open()
"/var/log/nginx/access.log" failed (13: Permission denied)
I'm confused why this is an issue — I changed the owner and group of /var/log/nginx/ to www-data. The nginx master process user is root, which I believe is correct, and the sub-processes are running (or trying to run) as www-data. The file permissions for error.log and access.log are 766. What am I missing?
You probably started
nginx -t
as a normal user. Then you get exactly that misleading error message
if you do it as root or with sudo the error should be gone

nginx wont restart - errors

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

Resources