Upgrading Drupal on Ubuntu 14.04

I finally upgraded my Ubuntu 10.04 LTS Linode to Ubuntu 14.04 LTS. Had a heck of a problem with what should have been a very simple upgrade.

I followed this Linode LAMP on Ubuntu 14.04  article, but it is missing a single, critical step. It does not cover installing libapache2-mod-php5. That's the P in LAMP that Apache interacts with for PHP based apps like Drupal or WordPress. Without this module being installed, you'll end up getting the PHP code displayed back in your browser. Then you'll spend a bunch of time on your apache2.conf and virtual host configs trying to figure out what's going wrong. Hopefully this will save you some time. 

Note that a lot of similar issues in the Drupal community will point at edits to the .htaccess file. I did not need to make any edits to this file once we had apache2.conf, 000-default.conf and petermcmillan.com.conf aligned correctly. 

Apache 2.4.7 introduces some other changes that you need to be aware of including using *.conf as the file naming convention in sites-available.

Here's my changes to /etc/apache2/apache2.conf:

<Directory />
  Options FollowSymLinks
  # AllowOverride None
  AllowOverride All
  # Require all denied
  Require all granted
</Directory>
 
<Directory /usr/share>
  AllowOverride None
  Require all granted
</Directory>
 
<Directory /var/www/>
  Options Indexes FollowSymLinks
  #AllowOverride None
  AllowOverride All
  Require all granted
</Directory>
 
Here's the /etc/apache2/sites-available/petermcmillan.com.conf
<VirtualHost *:80>
     ServerAdmin peterm95018@xxx.yyy
     ServerName petermcmillan.com
     ServerAlias www.petermcmillan.com
     DocumentRoot /var/www/html/drupal7
     ErrorLog /var/log/apache2/petermcmillan.com/error.log
     CustomLog /var/log/apache2/petermcmillan.com/access.log combined
     <Directory /var/www/html/drupal7>
        AllowOverride All
        Require all granted
     </Directory>
</VirtualHost>
 

Add new comment

By submitting this form, you accept the Mollom privacy policy.