Posted by brentratliff on July 16, 2010 at 2:07am
I'm attempting to use a Mercury stack as a server for 2-3 sites. I have separate codebases under /var/www (some pressflow, some drupal). I have vhosts setup with the NameVirtualHost myip:8080 in default and the appropriate vhost files in sites-available with a successful a2ensite. I get a "Forbidden 403" unless I manually insert :8080 in the URL. I suspect Varnish but is there a simple setup guide for vhosts with Mercury that I haven't found with search engines? Is Varnish compatible with name based virtual hosts? Thanks.

Comments
Mercury vhosts (name based) only available on port 8080
Hi,
I found this same issue.
I changed the VHOST from binding to my IP to binding to all available IP's.
Here is what I now have and it works as expected. I then add some firewall rules to block out the high port from the outside world.
The next thing is the sites you have with drupal and not pressflow are not going to work on port 80 (varnish).
As long as you haven't modified the drupal core you should be able to easily move the sites to pressflow.
Regards
Mick Pollard
www.lunix.com.au
Thanks, that worked. I did
Thanks, that worked. I did notice that the core Drupal virtual hosts no longer require the :8080 designation in the URL although they are not being served from Varnish. Does Varnish allow a passthrough of some sort? The Pressflow site is being served from Varnish. It appears to be working as I had hoped.
Twitter: http://twitter.com/brentratliff
Blog: http://laminarlogic.com
Varnish will pass the request
Varnish will pass the request to Apache if it is unable to serve from cache. So your core Drupal sites should work fine.
Thanks aaron01. That
Thanks aaron01. That explains why it's working. It's nice to be able to take full advantage of Mercury with Pressflow if you can, but still get APC for core Drupal sites on the same server that don't use Pressflow.
Twitter: http://twitter.com/brentratliff
Blog: http://laminarlogic.com
Varnish will pass the request
Thank's @aaron01. I didn't realise Drupal would still work with varnish, just not accelerated in any way.
I probably will never need this as a site just works with Pressflow without any need of migrating (as long as the core has not been tampered with)
Regards
Mick Pollard
www.lunix.com.au
For total clarity
You should still get some benefit from Varnish caching images and css files. While this is nowhere near as powerful as caching the whole page, it does help keep "busywork" off apache's back. ;)
https://pantheon.io | http://www.chapterthree.com | https://www.outlandishjosh.com
Pantheon Mercury - Getting In - Getting Out
So, let me get this straight.
1) You can setup Mercury/Pressflow with a VPS (Pantheon Mercury Linode stackscript), and use name based virtual hosts to serve both Pressflow and standard Drupal core sites off standard port 80?
2) You could - Move your Drupal standard core site to a Mercury/Pressflow site, and then "down-grade" or "standardize" it again if the need arises relatively simply - IE just changing the Drupal core files from Pressflow to standard Drupal core? No changing of the DB needed?
3) This would apply to any simple HTMl or say Wordpress sites you had in your Apache file as well ("Varnish will pass the request to Apache if it is unable to serve from cache.")?
Thanks.
re: Pantheon Mercury - Getting In - Getting Out
1) port 80 is used by varnish. Apache is on port 81 (or more recently 8080) and varnish takes what it sees on port 81 and serves it on 80.
2) I think the answer is yes, but I would ask this question in the pressflow group.
3) yes. :)
Hope this helps,
Greg
--
Greg Coit
Systems Administrator
http://www.chapterthree.com
I'm serving two Drupal core
I'm serving two Drupal core sites and one Pressflow site with vhosts on Mercury and it's been working great. My question is, can I use the multi-site Mercury instructions to convert all my sites over to Mercury configured Pressflow (Varnish, Solr, Memcached) on Mercury 1.0, or do I have to upgrade to 1.1 first?
Twitter: http://twitter.com/brentratliff
Blog: http://laminarlogic.com
re: I'm serving two Drupal core
We weren't thinking of multi-site when we created Mercury 1.0. You could look at 1.1 to see the changes we made (mostly the apache vhosts, apachesolr and memcahced prefixes in setting.php) and make them to your 1.0, or wait for 1.1. There are some really sweet things coming in 1.1 that I think make it worth waiting for.
Hope this helps,
Greg
--
Greg Coit
Systems Administrator
http://www.chapterthree.com