Apache 2.4 Config for Drupal 7

Published on Author JFLeave a comment

Here are some configs to hopefully make your life easier setting up a brand new server.

Specs:

  • Ubuntu 16 Xenial LTS
  • Apache 2.4.18
  • PHP 5.6.3
  1. After default Apache install make sure to add these modules
    a2enmod rewrite
    a2enmod headers
  2. Host Conf file
    DocumentRoot "/var/www/sitename/siteroot"
    ServerNameĀ www.yoursitename.com
    <Directory "/var/www/sitename/siteroot">
    allow from all [allows .htaccess to be used]
    Options FollowSymLinks
    AllowOverride All
    Require all granted
    </Directory>
  3. Don’t forget to restart Apache
    sudo service apache2 restart
  4. Here’s a link to Drupal with various configs. Beware using 2.2 vs 2.4 configs – they are different.
  5. And the main link to Drupal Apache configuration.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.