Enabling .htaccess in Apache for Drupal
Content management systems like Drupal require specific web server directives in order to work properly. The following steps enable Apache to recognize .htaccess files containing those specific web server directives. The steps outlined here require the use HTTPS for better security on both Debian-based Linux distributions and the FreeBSD operating system . ========== 1. DEBIAN-BASED LINUX DISTRIBUTIONS 1.1. Go to the directory containing the Apache site configuration files. user@host: $ cd /etc/apache2/sites-available 1.2. BACK UP the default HTTPS configuration file for the secure site. user@host: $ sudo cp 000-default-ssl.conf 000-default-ssl-conf.back 1.3. Open the default HTTPS configuration file. user@host: $ sudo nano 000-default-ssl.conf 1.4. Find the "DocumentRoot" section and add the "Directory" block marked "For Drupal" as follows. # BEGIN CODE <IfModule mod_ssl.c> <VirtualHost _default_:443> # .....
