Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Apache in Production

Nick Ruest edited this page Jan 6, 2019 · 4 revisions

Records may contain / in the Solr id field. Apache does not enable url encoding backslashes in urls by default. So, a record view page will result in Apache producing a [404] when returning the record because the url is constructed with the Solr id field. The following is an example Apache config that enables url encoding blackslashes with Passenger.

<VirtualHost *:80>
  ServerName warclight.archivesunleashed.org
  LogLevel warn
  ErrorLog /var/log/apache2/warclight.archivesunleashed.org_error.log
  CustomLog /var/log/apache2/warclight.archivesunleashed.org_access.log combined

  DocumentRoot /path/to/warclightdemo/public
  RailsEnv production
  AllowEncodedSlashes on
  RewriteEngine on

  <Directory "/path/to/warclightdemo/public">
    Options FollowSymLinks
    Require all granted
    PassengerAllowEncodedSlashes On
  </Directory>
</VirtualHost>