I’m not able to start/reload my Ngnix server. Here are the error messages I get
nginx.service is not active, cannot reload.
2025/04/02 11:30:29 [warn] 18813#18813: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
2025/04/02 11:30:29 [emerg] 18813#18813: open() "/run/nginx.pid" failed (13: Permission denied)
nginx: configuration file /etc/nginx/nginx.conf test failed
The error looks like the process is not being started with the correct permissions. Are you using sudo to start the processes with root level privileges? It needs to be run with elevated permissions in order to be able to bind to port 80/443.
I’ve got another problem now. So I created my own DNS server via Bind9.
But I’m trying to create an SSL certificate with LetsEncrypt. I get this error when I run sudo certbot --nginx --agree-tos --preferred-challenges http -d domain-name.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
The requested nginx plugin does not appear to be installed
. This also could explain why I can’t access my app with domain name arborhub.io on another device (client-side).
Since DNS servers can’t access the IPv6 for my server.
This file may be of some help, /etc/bind/arborhub.io
GNU nano 8.1 /etc/bind/arborhub.io
$TTL 86400
@ IN SOA ns1.arborhub.io. admin.arborhub.io. (
2025040102 ; Serial
3600 ; Refresh
1800 ; Retry
1209600 ; Expire
86400 ; Minimum TTL
)
IN NS ns1.arborhub.io.
IN NS ns2.arborhub.io.
@ IN AAAA 2600:6c67:107f:faf1:b297:1a4c:9434:d6c9
ns1 IN AAAA 2600:6c67:107f:faf1:b297:1a4c:9434:d6c9
ns2 IN AAAA 2600:6c67:107f:faf1:b297:1a4c:9434:d6c9
www IN AAAA 2600:6c67:107f:faf1:b297:1a4c:9434:d6c9
Basically trying to get my Django/Vuejs project to production but with domain name arborhub.io.
so it looks like there is a couple issues here. For the letsencrypt side, it is complaining about a module missing, have you verified that all of the necessary modules(python3-certbot-nginx) are installed? For NGINX failing to start, its pretty clear that the issue is that it does not have permissions on the /run/nginx.pid file. Does that path exist on the system? Also, is the file you shared the entire nginx.conf file? It looks like it is only showing the server block portion of the config, which would not be a complete NGINX configuration. You can find the default nginx.conf in the gitrepo
Thank you for responding to me. So are you suggesting that this is causing a possible conflict between my nginx server and checkmk, since checkmk runs on apache server?
I asked because not only can I not start nginx server but also run checkmk. I’ll try and fix these problems that you mentioned
You don’t have to edit the file, but the user NGINX runs as needs to be able to create the file. Once you added a complete config, are you able to start NGINX?