view modules/apache/templates/vhost/_scriptalias.erb @ 257:675c1cc61eaf

Update Apache module to get CentOS 8 support Unfortunately it only fixes some bits. mod_wsgi still needs other approaches This also overrides the vhost modification to make them come last in the import order (after module loading)
author IBBoard <dev@ibboard.co.uk>
date Sun, 22 Dec 2019 14:43:29 -0500
parents 956e484adc12
children b8d6ada284dd
line wrap: on
line source

<%- if @scriptaliases.is_a?(Array) -%>
<%-  aliases = @scriptaliases -%>
<%- elsif @scriptaliases.is_a?(Hash) -%>
<%-  aliases = [@scriptaliases] -%>
<%- else -%>
<%-  # Nothing to do with any other data type -%>
<%-  aliases = [] -%>
<%- end -%>
<%- if @scriptalias or !aliases.empty? -%>
  ## Script alias directives
<%# Combine scriptalais and scriptaliases into a single data structure -%>
<%# for backward compatibility and ease of implementation -%>
<%- aliases << { 'alias' => '/cgi-bin', 'path' => @scriptalias } if @scriptalias -%>
<%- aliases.flatten.compact! -%>
<%- aliases.each do |salias| -%>
  <%- if salias["path"] != '' -%>
    <%- if salias["alias"] and salias["alias"] != '' -%>
  ScriptAlias <%= salias['alias'] %> "<%= salias['path'] %>"
    <%- elsif salias["aliasmatch"] and salias["aliasmatch"] != '' -%>
  ScriptAliasMatch <%= salias['aliasmatch'] %> "<%= salias['path'] %>"
    <%- end -%>
  <%- end -%>
<%- end -%>
<%- end -%>