cache

On a previous post I already explained briefly what Varnish is and the advantages of running it along with Pound to get an amazing caching architecture under HTTPS for Drupal. On this tutorial I'll upgrade the steps so we can run both, Drupal 7 and Drupal 8 sites with Varnish 4.x which at the time of this post, is the latest supported by Drupal 8. Also, the Ubuntu version used is 16.04 which is the latest LTS release from the Ubuntu guys.

Alright, let's begin by getting the required packages. First, we need to get Pound, a version superior to 2.7 which implements fixes for Poodle attacks. Visit this…

Read more...
Wednesday, March 1, 2017

Update: I have updated this tutorial to a latest release of Varnish, read here.

By default, Varnish does not work and it will never work with HTTPS requests it only understands plain HTTP. This means, that on mixed content websites, sites serving HTTPS and HTTP pages, the secure pages won't be or cannot be cached on Varnish reducing the load time compared to the non-secure version of the page for example.
There are many sites that offer lots of static content through HTTPS that can definitely be cached using Varnish and in order to do so we need to implement an extra layer before any request goes to our Varnish Server. This layer is going to be handled by a Load Balancer/Proxy Server which will take care of routing the HTTP and the HTTPS requests, by interpreting SSL and converting the…

Read more...
Friday, March 27, 2015

Another good option to run Drupal sites nowadays is Nginx. Nginx is a Proxy/Web Server not as complex as Apache and is well known for is security, responsiveness and speed when handling PHP apps together with PHP-FMP. On this this post I will introduce you on how to manually install and run Nginx and PHP-FPM so you can host any Drupal site with SSL support.

Recommended posts:

The suggested installation instructions by drupal.org: https://www.drupal.org/node/2310819
Perusio Nginx suggested Drupal Configuration https://github.com/perusio/drupal-with-nginx/tree/D7#installation…

Read more...
Thursday, February 26, 2015

On this tutorial I will show you how to configure Varnish as a proxy server so you can re route you requests to any Apache or Nginx Server. 
Configuring Varnish on Ubuntu on distributed Servers is not a complex task, we just need to download some packages and then we will have to copy/paste the configurations below in order to start. Feel free to modify the provided configurations according to your needs. This post assumes there is another server Apache/Nginx listening on port 80 and running a Drupal site. 
Ok, Let's begin.

Install Varnish 3.0.5 from Ubuntu 14.04 repositories:

$sudo apt-get install varnish

Configure varnish deamon:

$sudo nano /etc/default/varnish


DAEMON_OPTS="-a :80,:…
Read more...
Tuesday, January 20, 2015

You might have crossed through this error a lot when developing web apps sharing multiple domain names for the same app and it usually triggers when app with domain name A tries to grab images/fonts/audio and somo other files from the same app with domain name B. Cross-Origin Request defines a way for browsers to share content in a secure way preventing your site of Cross Site Scripting attacks. But sometimes you do have apps that require multiple domain names and the resources must be shared between these in the same network so you know that content sharing is secure.


Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://mysite.com/sites/all/themes/mysite/js/slick/slick/fonts/slick.woff. This can be fixed by moving the resource to the same domain or enabling CORS.…
Read more...
Sunday, November 2, 2014

On this post I'll show you some quick steps to install and configure Memcache on Ubuntu 14.04 so you can enable Memcache on your Drupal installation.

First, you need to get some necessary packages from the Ubuntu repository, on a terminal window type:

# sudo apt-get install memcached php5-memcache

This will install the Memcache Server deamon and the PHP Memcache Extension.

Then, on your settings.php file you will need to add this lines in order to activate the Memcache Drupal module, see the module's documentation for more information about extend your memcache functionality.

Read more...
Saturday, November 1, 2014