You need to check /etc/init.d/nginx. You will notice some hidden activity, i.e. usage of
'nginx-util', doing some configuration magic besides /etc/nginx.conf .
You might get more info about your problem when manually starting nginx from cmd line.
Just type 'nginx' after login to router.
nginx doesn't seem to have any issues starting up normally, running nginx or /etc/init.d/nginx start both work without errors if I run them immediately after booting up.
I forgot to mention, I don't have nginx listening on port 80 I'm using it with nginx-rtmp so it's only binding to 1935. It has no problems if I bring it up manually.
I know it's an older topic but I have the same problem and use-case: I want to run nginx with RTMP on the Raspi that's running OpenWrt. Currently I'm struggling with the ports, as uhttpd and nginx fight over port 80.
Can you maybe share your configs and where you made which change?
I had same problem as yours, and I use stream module in nginx.conf, and the point is, for server there, CAN NOT BE domain, i changed the domain to IP address, nginx is running after reboot.
events{...}
stream {
server {
listen 1234;
proxy_ssl on;
proxy_ssl_protocols TLSv1.3;
proxy_ssl_server_name on;
proxy_ssl_name hello.world;
proxy_pass VPS IP:5678; # here must be IP other than domain
}
}
http{...}