This quick note outlines the additional steps required for installing Drupal 8 on the central web infrastructure (web.stanford.edu and AFS). In other words, it doesn't show all the steps (download Drupal, untar it, etc.), just the few steps needed that are special to our infrastructure.
Allowing Drupal to install by changing the .htaccess file
After you've downloaded Drupal, you'll need to modify the .htaccess file that comes with it before you do anything else or the installation won't even start. You'll get an error from the web server.
Comment out the following line found towards the beginning of the .htaccess file:# Don't show directory listings for URLs which map to a directory. Options -Indexes # Follow symbolic links in this directory. Options +FollowSymLinks
# Don't show directory listings for URLs which map to a directory. # Options -Indexes # Follow symbolic links in this directory. # Options +FollowSymLinks
You also will need to edit the .htaccess file in the sites/default/files directory to comment out the Options lines, so that it looks like this:
# Turn off all options we don't need. # Options None # Options +FollowSymLinks
Preparing for Clean URLs
Drupal 8 will check whether the server supports clean URLs during installation and will turn them on if it does. To do this, Drupal 8 needs a little help. It requires a change in the .htaccess file. Find these lines at the bottom of the file:
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a # VirtualDocumentRoot and the rewrite rules are not working properly. # For example if your site is at http://example.com/drupal uncomment and # modify the following line: # RewriteBase /drupal
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a # VirtualDocumentRoot and the rewrite rules are not working properly. # For example if your site is at http://example.com/drupal uncomment and # modify the following line: RewriteBase /dept/its/cgi-bin/drupalrocks
That's it for the .htaccess file.