Is Pantheon to host only one drupal application?

Events happening in the community are now at Drupal community events on www.drupal.org.
bibstha1's picture

The concept on including reverse proxy seems very interesting. However it allows one to use it only one application at a time.

Has anyone used this setup to multiple websites using virtualhosts?

Comments

Well other than supposedly

Macronomicus's picture

Well other than supposedly all the varnish caches flushing when you flush cache on one of the sites but that shouldn't cause too much trouble for just a few sites... or at least Ive not noticed any trouble myself. Perhaps that "may" be fixed now & thats why ive not noticed anything.

I installed Mercury in Linode

lelizondo's picture

I installed Mercury in Linode and I tried to configure a few virtualhosts but I just couldn't, I had all kind of problems with apache. It would be good if anyone publish a guide or a link on how to do it.

Luis

You can setup several sites

Alexander Langer's picture

You can setup several sites on one server by using port based virtual hosts with apache and multiple backends with varnish. Let's say you have two sites and you use this syntax in your apache config:

<VirtualHost aaa.bbb.ccc.ddd:9001>
  --- config of site A goes here ---
</VirtualHost>

<VirtualHost aaa.bbb.ccc.ddd:9002>
  --- config of site A goes here ---
</VirtualHost>

Don't forget to add these lines to you apache config, usually done in ports.conf:

Listen 9001
Listen 9002

Check if everything's up and running by requesting your websites A and B over their ports in your browser.

After this you have to add something like this to the beginning of your varnish config file, where aaa.bbb.ccc.ddd refers to the site's ip address used in the apache vhost configuration:

backend siteA {
.host = "aaa.bbb.ccc.ddd";
.port = "9001";
.connect_timeout = 600s;
.first_byte_timeout = 600s;
.between_bytes_timeout = 600s;
}

backend siteB {
.host = "aaa.bbb.ccc.ddd";
.port = "9002";
.connect_timeout = 600s;
.first_byte_timeout = 600s;
.between_bytes_timeout = 600s;
}

And put this in first place of "sub vcl_recv {" in your varnish config:

  if (req.http.host ~ "^domainA.tld$") {
    set req.backend = siteA;
  } else if (req.http.host ~ "^domainB.tld$") {
    set req.backend = siteB;
  }

Replace domainA and domainB with the domain names of your sites A and B.

I have drupal multisite up

WhenInRome's picture

I have drupal multisite up without any problems. Didn't have to the ports in the vhost config or anything.

Mercury

Group organizers

Group categories

Post Type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: