Author Topic: Editing vhost template breaks vhost config when varnish is enabled  (Read 9878 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
CWP 0.9.8.6

I have configured varnish on apache with varnish listening on <main IP>:80 and apache listening on 127.0.0.1:82.

I have virtual hosts configured in apache.  Initial setup (before varnish) put the vhosts on <main IP> and the vhosts config file defined each vhost as

  # vhost_start <my domain>
  <VirtualHost 107.191.xxx.xxx:80>

After initial configuration of varnish, CWP edited the vhosts config file to:

  # vhost_start <my domain>
  <VirtualHost 127.0.0.1:82>

Good - everything works like this.

I now edited my vhost template (to add an errordocument) and rebuilt the virtual hosts

Just above the rebuild window, CWP tells me that:

  Rebuilding Apache vHosts will delete all Domains and Sub-domains from Virtual Host file and build new based on your template file.
  Shared IP which will be used in configuration: 127.0.0.1 on port: 82

Good

But, after the rebuild, the vhosts file has actually become:

  # vhost_start <my domain>
  <VirtualHost 107.191.xxx.xxx:82>

So the rebuild edited the IP back to the main IP instead of leaving it at 127.0.0.1

To get the site working again I have to go to the varnish setup page, deconfigure (apache back to main IP:80) then reconfigure (apache to 127.0.0.1:82) - then the vhosts file gets updated correctly



Offline
**
Re: Editing vhost template breaks vhost config when varnish is enabled
« Reply #1 on: May 03, 2015, 01:30:35 PM »
Yes the ip used will be the shared ip address , iv only been able to get varnish and apache to work properly ( suspended domains doesnt work) by setting the shared ip address to 127.0.0.1 the vhosts are rebuilt correctly.

Offline
*
Re: Editing vhost template breaks vhost config when varnish is enabled
« Reply #2 on: May 06, 2015, 06:29:55 AM »
..and just to add an update to this.  If I add a new domain while varnish is enabled (and the shared IP is already set to 127.0.0.1) then the new vhost does get the correct (127.0.0.1) address in the vhost conf file.

So the problem seems to be just when the template is edited

Offline
*
Re: Editing vhost template breaks vhost config when varnish is enabled
« Reply #3 on: June 25, 2015, 08:13:32 AM »
hi there,

was this issue resolved at all? i am having the same problm with a new install of cwp.