Datastorage for namevirtualhosts

badzilla

Member
Mar 3, 2008
19
0
51
Where is the datastorage for namevirtualhosts located ?

My main.default template has these lines

Code:
[%- FOREACH nvh IN namevirtualhosts -%]
NameVirtualHost [% nvh %]
[% END -%]
and after a build, it has inserted both IP's that I use, even though only one of them is my shared IP.

I have tried to change the httpd.conf, and run the apache_distiller, but it's not picking it up.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
308
cPanel Access Level
Root Administrator
Where is the datastorage for namevirtualhosts located ?

My main.default template has these lines

Code:
[%- FOREACH nvh IN namevirtualhosts -%]
NameVirtualHost [% nvh %]
[% END -%]
and after a build, it has inserted both IP's that I use, even though only one of them is my shared IP.

I have tried to change the httpd.conf, and run the apache_distiller, but it's not picking it up.
If there is an IP Address you don't Apache to listen on, then use the Reserved IPs editor in Apache Setup within WHM to disable the IP Address.
 

badzilla

Member
Mar 3, 2008
19
0
51
I know, and that part is working, but why is it using all the IP addresses that it listen for, to name the NAMEVIRTUALHOST's ?

In basic settings I set which IP was used for shared hosting, so why not just use that IP for NAMEVIRTUALHOST ?

Or have I misunderstood the way NAMEVIRTUALHOST is workin.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
308
cPanel Access Level
Root Administrator
I know, and that part is working, but why is it using all the IP addresses that it listen for, to name the NAMEVIRTUALHOST's ?

In basic settings I set which IP was used for shared hosting, so why not just use that IP for NAMEVIRTUALHOST ?

Or have I misunderstood the way NAMEVIRTUALHOST is workin.
The Basic Settings has little to do with what the httpd.conf tools are doing. The IP Address defined in Basic Setup is used during account creation. It is not used to define the NameVirtualHost entries.
 

badzilla

Member
Mar 3, 2008
19
0
51
So what exactly is used to define namevirtualhosts ?

I'm still wondering why the template doesn't look like this

Code:
[%- FOREACH vh IN sharedips -%]
NameVirtualHost [% vh %]
[% END -%]
This is the code I have placed in main.local, and it makes httpd.conf look like I would expect.
 
Thread starter Similar threads Forum Replies Date
J General Discussion 6