Author Topic: Nginx  (Read 1517 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Nginx
« on: December 20, 2023, 09:43:29 PM »
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?


Offline
*****
Re: Nginx
« Reply #1 on: December 20, 2023, 09:55:22 PM »

Offline
*
Re: Nginx
« Reply #2 on: December 20, 2023, 11:02:43 PM »
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

Offline
*****
Re: Nginx
« Reply #3 on: December 20, 2023, 11:27:38 PM »
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.

Offline
*
Re: Nginx
« Reply #4 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?


Offline
****
Re: Nginx
« Reply #5 on: December 21, 2023, 03:41:26 AM »
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

Offline
*****
Re: Nginx
« Reply #6 on: December 21, 2023, 07:36:07 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.

Offline
*
Re: Nginx
« Reply #7 on: December 21, 2023, 02:53:39 PM »
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.

Offline
*****
Re: Nginx
« Reply #8 on: December 21, 2023, 04:27:57 PM »
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.