I've changed the path of nginx.conf file, and I meet error when run nginx-t as below:
nginx -t
nginx: [emerg] open() "/etc/nginx/conf/nginx.conf" failed (2: No such file or directory)
How to configure nginx with the right real-in-use path of nginx.conf?
Thank you very much!
Related
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
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 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
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
I've compiled and installed nginx from source with three easy commands:
./configure
make
sudo make install
Now when I try to run nginx under my default user, I get this message:
nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
It also doesn't work with sudo with a pretty strange error:
sudo: nginx: command not found
So does anybody know: What can I do in this situation?
Add /usr/local/nginx/sbin to your PATH variable in /etc/environment.