NGINX randomly stopped working

I have setup NGINX using openhabian-config and this works great. But randomly it will stop working.
To the point where i cant log into openhab remotely and i need to port forward to access my openhab over the network. the NGINX conf shows no errors when testing, but i cannot restart NGINX as i get an error saying port 80 is already in use.

I have it setup with just HTTP, with no ssl certificates.

seems as though it has somethign to do with apache, as if i uninstall apache and restart nginx it works.

Any ideas? I have gone back to just having the port forwarded but I would like to setup NGINX again.

By default both NGINX and Apache want to use port 80. Only one program can use a port at the same time. You need to uninstall apache, or configure apache to use some other port.

1 Like

I uninstall Apache and it installs itself again some time later automatically

I’ve setup nginx to listen to port 70 and it seems to work after I forwarded port 80 to port 70 on my router so I’ll see how it goes for now

For now this hasn’t stopped yet. SO it seems to be ok.
I forwarded my router for an external port of 80 and internal of 70, and setup NGINX to listen to port 70. So far so good.

Consider this solved.