Drupal Installation: 500 Internal Server Errors

Drupal Installation: 500 Internal Server Errors

During the installation of Drupal, it’s quite common to hit “500 Internal Server Error”s.

Looking at your sites error logs generally will reveal a couple errors:

.htaccess: order not allowed here

and/or

.htaccess: DirectoryIndex not allowed here

What you’re hitting here are collisions between your apache configuration and the directives that are in the Drupal .htaccess file.  The default site folder options for Apache are fairly restrictive.  These are the settings in the main httpd.conf, and are the default options for every site running on your server.

I wouldn’t recommend changing this setting at the global level.  It is best to make the changes in the VirtualHost configuration for the site, so only that site is affected.

The simplest method would be these settings:

<Directory “/path/to/your/webroot”>
AllowOverride All
Options FollowSymLinks
</Directory>

AllowOverride

AllowOverride tells Apache which settings a .htaccess file is allowed to change.

Druapl AllowOverride Settings:

All – This basically says, let the .htaccess file change anything.  And it’s the easiest way to get up and going.

Limit – Allows Drupal to change the Order Allow/Deny settings.

Indexes – Allows Drupal to change the “Options” to -Indexes

Options

Options sets the initial Apache options, which can then be modified by any AllowOverride settings. Ideally you can set this to what Druapl wants to begin with, then remove the other lines that are making the changes from the .htaccess file.

Drupal Options Settings:

These are the settings Drupal is actually trying to get too.

Options -Indexes

Options +FollowSymLinks

Other Related Errors

FileInfo allows the changes for ErrorDocument. Not having this option causes the error:  .htaccess: ErrorDocument not allowed here.

DirectoryIndex allows Drupal to set DirectoryIndex, the default file handler.  Not having this option causes the error: .htaccess: DirectoryIndex not allowed here.

Not quite sure what config setting is causing this error, but it happens when the .htaccess tries to change PHP settings, which causes the error:  .htaccess: php_value not allowed here.