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 Aug 20, 2017 · 4 revisions

Records may contain / in the Solr id field. Apache does not enable url encoding backslashes in urls by default. So, a item view page will result in Apache 404'ing when attempting to load item because the url is constructed with the Solr id field. The following is an example Apache config to enable 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>