Control Web Panel

WebPanel => How to => Topic started by: KueMedia on December 20, 2020, 06:54:38 AM

Title: Subdomain redirect to other internal webserver
Post by: KueMedia on December 20, 2020, 06:54:38 AM
Im trying to work out how to set up a reverse proxy I guess to other internal server host other website that has SSL. Now I've seen some metions of a HAProxy and I just have no idea what im really doing. Can someone help me?
Title: Re: Subdomain redirect to other internal webserver
Post by: studio4host on December 22, 2020, 05:46:31 AM
you can do it by using the configuration of the webserver per domain from cwp.admin and there you would set proxy to custom IP/port.
Title: Re: Subdomain redirect to other internal webserver
Post by: KueMedia on December 24, 2020, 10:08:13 AM
How would one go about doing that?
Title: Re: Subdomain redirect to other internal webserver
Post by: studio4host on December 24, 2020, 09:54:46 PM
as said using webservers per domain conf in cwp admin, similar to default server configuration used as global config
http://wiki.centos-webpanel.com/webservers-vhost-templates
Title: Re: Subdomain redirect to other internal webserver
Post by: KueMedia on December 25, 2020, 07:14:21 AM
So Would I create a subdomain on CWP.admin for the selected domain then use the Webserver Domain Conf?
Title: Re: Subdomain redirect to other internal webserver
Post by: studio4host on December 25, 2020, 10:10:34 AM
by info from tomcat instructions, it's the same for any app using custom port like nodejs...only port number needs to be replaced.


Configure webservers for domain to be used for Tomcat:
CWP.Admin left Menu -> Webserver settings -> Webserver Domain Conf -> Select Username -> Select Domain/Subdomain -> create configuration -> select any option with (custom port) -> check the box - Rebuild webserver conf for domain on save -> Enter port 8080 for the custom port, leave IP as 127.0.0.1 -> save changes
 
Copied from:
http://wiki.centos-webpanel.com/how-to-install-ssl-for-tomcat-on-cwp