alexandz

Well-Known Member
Oct 28, 2011
111
0
66
Chile
cPanel Access Level
Root Administrator
Hello!

My server uses the public IP xxx.xxx.xxx.xxx, but then I have an internal IP for VPN xx.xxx.xx.x
- Try adding *: 80 in httpd.conf, but it did not work
- Then try to add the same virtualhost with different IP, as below:
"If your Apache configuration" httpd.conf "file already has an entry similar to One of These then It Should Only Be Necessary to add the One That does not yet exist (copying and pasting preferrably the existing default virtual host and only changing the IP address) "

code:
<VirtualHost 10.0.0.27:80>
**************** ServerName server.domain.tld
**************** DocumentRoot / usr / local / apache / htdocs
**************** ServerAdmin [email protected]
</ VirtualHost>

<VirtualHost 10.0.0.33:80>
**************** ServerName server.domain.tld
**************** DocumentRoot / usr / local / apache / htdocs
**************** ServerAdmin [email protected]
</ VirtualHost>
But this did not work either.

If someone could help me, as I can have multiple IP for a virtualhost

thanks
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
There is no way under cPanel to allow multiple IPs for a single virtualhost entry in this manner. You'll need to use /usr/local/apache/conf/includes/pre_virtualhost_global.conf to define the entries for the virtualhost and put both IPs into it:

<VirtualHost IP1:80 IP2:80>
the rest of the entry

This may or may not work. As noted, this isn't something we currently support.