SOLVED apps with nginx

CirKan

Cadet
Joined
Sep 7, 2022
Messages
5
Does anyone know why nextcloud comes with nginx in the same container?

Why not use the nginx app itself and allow the user freedom to use the port of his choice and not increase the consumption of resources having several nginx running simultaneously?

Thank you.
 

subnetspider

Dabbler
Joined
Aug 27, 2023
Messages
16
Because the few megabytes of RAM you'll save by running fewer instances of Nginx are not enough to justify the extra work.
This would have been a different discussion 20-30 years ago, but today RAM prices are so low that this argument has no real value.
But if this is something you want for yourself, no one is stopping you from creating your own containers.:smile:
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I'd further say that without some web server, the Nextcloud container just isn't very useful. It doesn't especially matter to me whether that's nginx, Apache, or (my preference) Caddy, but it really needs some web server running.
 

CirKan

Cadet
Joined
Sep 7, 2022
Messages
5
And the fact of not being able to freely choose the port, I would like to be able to use 443. But this way it is not possible.

In some situations there are ports that are blocked.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
OK.

You're using a container with nginX in it and that's on port 443... (I'm guessing)

You want to use that same port for Nextcloud, so you're having trouble figuring out that your approach isn't the right one.

What you need is to use a reverse proxy like Traefik or nginX Proxy Manager, giving port 443 to it, then have it point at your apps (additional nginX, Nextcloud, whatever else) on whatever port they will use.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I would like to be able to use 443. But this way it is not possible.
That's what a reverse proxy is for, as well as for handling TLS termination.
 

CirKan

Cadet
Joined
Sep 7, 2022
Messages
5
Thanks for your help.

I've been trying to figure this out for a while; I have achieved it by redirecting the url in nginx to the same url but to the port chosen in the nextcloud configuration.

Thanks again for the help.
 
Top