OpenVZ Forum


Home » General » Discussions » OpenVZ Containers and ports for domains (Redirect domains by ports and containers)
OpenVZ Containers and ports for domains [message #49509] Thu, 09 May 2013 03:07 Go to next message
pol25 is currently offline  pol25
Messages: 5
Registered: May 2013
Junior Member
Hi everybody it´s my first post here

I install proxmox and create 2 containers with OpenVZ , in each container use centos 6.3 and install zpanelx in one case and in other ispconfig for try , all ok i use ip forward for redirect by port and access each container

For example for access the container 1 with zpanel put 34.555.44.33:1080 and in the other case the same ip and with different port for access to the other control panel ispconfig , all working over NAT

Ok the problem it´s how i can add domains , because into DNS i ca´nt add port ..... and my problem it´s this if i have different containers and use the same ip how i can manage different OS in each container and for example add domains , etc for each control panel

I read something about reverse proxy and other things but i supose here sure can tell me something more about this

Sure exists the way for redirect to private ip from ip fixed and in this case to container and works all but i don´t know how i can this


Regards and thankñ´s for the help
Re: OpenVZ Containers and ports for domains [message #49519 is a reply to message #49509] Fri, 10 May 2013 05:26 Go to previous messageGo to next message
Paparaciz
Messages: 302
Registered: August 2009
Senior Member
yes, you can use reverse proxy for http, otherwise get more ip addresses.

for control panels I don't see any problem as long as they are on different ports.
if you want to have same control panel in different CT, just use different port in each CT.

Re: OpenVZ Containers and ports for domains [message #49520 is a reply to message #49519] Fri, 10 May 2013 05:32 Go to previous messageGo to next message
pol25 is currently offline  pol25
Messages: 5
Registered: May 2013
Junior Member
Hello actually i have one fix ip in the server and have 2 containers openvz and into each container i have ispconfig , the problem it´s for domains , which ip i can do this domains , because the domain need one and for example if i use the same ip i can redirect to different containers using the port , same ip and change the port and works fine but for add domains , what kind of ip i need give for that and works

Regards and thank´s for your help !
Re: OpenVZ Containers and ports for domains [message #49521 is a reply to message #49509] Fri, 10 May 2013 06:00 Go to previous messageGo to next message
Paparaciz
Messages: 302
Registered: August 2009
Senior Member
if you want to use http port for all domains you have to use reverse proxy.

do it in one of CT, or create 3'rd CT, install nginx or apache and than in this CT setup proxying.

it's nothing to do with domains, it's about one port (tcp/80).
Re: OpenVZ Containers and ports for domains [message #49522 is a reply to message #49521] Fri, 10 May 2013 06:16 Go to previous messageGo to next message
pol25 is currently offline  pol25
Messages: 5
Registered: May 2013
Junior Member
Yes sorry howewer no understand this and get errors for this things , if i have one domain this domain need DNS and this DNS go to ip , for example 35.345.65.76 it´s my machine´s ip

I can have 2 containers and in each case :

Container 1 :

35.345.65.76:1080

Container 2 :

35.345.65.76:1075


In the machine i install Debian with proxmox and no have any more


In each container i have 2 CP ISPConfig and in each container i have different OS in this case Centos 6.3


When i go add domains in each CP i need add domain and for example add www.mydomain.com ok all well

Now i go to for example name.com and put the ip of my server in this case : 35.345.65.76

The domain try access to ths ip but never load the container where i put or add this domain , it´s this point where i don´t understand how i can redirect the domain in each case to container where i have the CP and until add the domain , because into DNS and A records of domains i can´t put 35.345.65.76:1080 . impossible put port - , etc , it´s this point where i can´t understand if it´s possible appoint domain to container or different containers with the same ip but with other port - port of container - , many people into OVH tell me this it´s impossible and i need ipfailover

I understand sure there is method for when domain go to ip this ip can detect domain and redirect in mode automatic or manual i don´t know but i supose it´s possible because really all containers use NAT and use private IP


Sorry for this long text and thank´s for all possible help at this point i can´t progress , regards

Re: OpenVZ Containers and ports for domains [message #49524 is a reply to message #49522] Fri, 10 May 2013 07:10 Go to previous messageGo to next message
Paparaciz
Messages: 302
Registered: August 2009
Senior Member
1. there is no possibility in DNS to tell which port to use.
dns name just tells which host to access.
port is what service to access on that host, as example 80/tcp port typically means http service

2. please read my answers. I already told you what to do

3. you can always redirect connection to some port to CT with iptables. than you can access needed service some_domain.com:some_port

4. if you don't understand how things works (dns, services and etc) please read manuals and books. your problem is not related to openvz.

Re: OpenVZ Containers and ports for domains [message #49525 is a reply to message #49524] Fri, 10 May 2013 07:15 Go to previous messageGo to next message
pol25 is currently offline  pol25
Messages: 5
Registered: May 2013
Junior Member
yes i understand but for works domains in each case i need add rules to iptables if i want use NAT with containers when i add domain also i need add rules to iptables for this domain , right ? because i create the rules for containers and works with ports , but no for domains , that´s only


Thank´s
Re: OpenVZ Containers and ports for domains [message #49526 is a reply to message #49525] Fri, 10 May 2013 07:23 Go to previous messageGo to next message
Paparaciz
Messages: 302
Registered: August 2009
Senior Member
pol25 wrote on Fri, 10 May 2013 10:15
yes i understand but for works domains in each case i need add rules to iptables if i want use NAT with containers when i add domain also i need add rules to iptables for this domain , right ? because i create the rules for containers and works with ports , but no for domains , that´s only


Thank´s


no, you are not right.

dns only tells which host to access. nothing more.
with iptables you create rules only for ip and port. nothing more.
Re: OpenVZ Containers and ports for domains [message #49527 is a reply to message #49526] Fri, 10 May 2013 07:30 Go to previous message
pol25 is currently offline  pol25
Messages: 5
Registered: May 2013
Junior Member
Yes understand , and can you tell me please if i can see for some solution for insert domain and this automac appoint the control panel install in container , and using the same ip load this domain , sure if you understand i try to do sure you can tell me some solution for i can investigate more and create solution , because when launch domain by DNS go to ip no port ok , but when receive this domain in this ip if it´s possible redirect this domain how i can do because the domain add into containers and into de contol panel of ispconfig no into the server , the real server

Thanks for yout help other time
Previous Topic: OpenVZ-Container does not restart/reboot
Next Topic: OpenVZ precreated template root compromised ?
Goto Forum:
  


Current Time: Thu Dec 26 19:18:13 GMT 2024

Total time taken to generate the page: 0.02279 seconds