Nginx

Started by phalcon, December 20, 2023, 09:43:29 PM

Previous topic - Next topic

phalcon

Normally I use Docker and Nginx Proxy and I dont host websites.

With CWP obviously there is already webservers running and listening on port 80.

Is there a solution to be able to make it so my docker container listens on port 80 instead of the default webservers with CWP?


Starburst


phalcon

right, but the issue I am having is cwp webserver works on port 80/443 and I want my docker container to work on those ports.

but only for a specific TLD on my server

Starburst

Yea, you can't run Docker on 1 site on ports 80/443 and Apache for another site on ports 80/443.

It's either all or nothing on the same server.

phalcon

1) do i need apache/nginx  enabled on a CWP server?
will webmail and the back end all work?

2) No option to activate apache for some domain names and not others?


rcschaff

If the server has multiple VALID ip's, you can do custom configurations.  But if you only have one IP, you are stuck.
Google Hangouts:  rcschaff82@gmail.com

Starburst

Quote from: phalcon on December 21, 2023, 03:01:21 AM
1) do i need apache/nginx  enabled on a CWP server?
will webmail and the back end all work?

2) No option to activate apache for some domain names and not others?

1a) No, CWP doesn't require Apache/Nginx to work. The backend uses cwp-srv.
Webmail is a Redirect for Apache/Nginx though, so if you have them disabled, then webmail would stop working.

2a) You could theoretically have multiple webservers running listening on the same port, but specifically for certain IP's.
But that would be overly complicated, and not guaranteed to be 100% for production use.

phalcon

currently, I have 3ips xxx.xxx.xxx.211 .212 and .213

I have a larger block I could assign more if I wanted to.

if I could route all traffic to .213 so nginx proxy manager was on port 80/443 that would solve my issue.


thanks for help, normally I just run a separate vm server for docker and another vm for cwp/cpanel stuff, but I'm trying to do it all on one vm for a client.

Starburst

Check out: https://nginx.org/en/docs/http/request_processing.html

Under 'Mixed name-based and IP-based virtual servers', might help you. They show an example.

But again, your getting into something that's going to get complicated and may hicup.

Good luck.