Skip to content

Commit

Permalink
httpd: Add ErrorDocument handling on / in non-mass-hosting templates
Browse files Browse the repository at this point in the history
This closes #79
  • Loading branch information
Patrick J Cherry committed Aug 17, 2017
1 parent a531dfd commit e138f3d
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
19 changes: 19 additions & 0 deletions httpd/apache.d/non_ssl.template.erb
Expand Up @@ -27,6 +27,25 @@
#
<%= server_aliases %>

#
# This is the directory people are redirected to if their site is
# empty.
#
Alias /bytemark/ "/usr/share/symbiosis/static/"
<Directory "/usr/share/symbiosis/static/">
DirectoryIndex index.html
AllowOverride All
Require all granted
</Directory>

#
# And this makes that redirection happen.
#
<LocationMatch "^/+$">
Options -Indexes
ErrorDocument 403 /bytemark/
</LocationMatch>

#
# Allow users to override settings via .htaccess
#
Expand Down
37 changes: 37 additions & 0 deletions httpd/apache.d/ssl.template.erb
Expand Up @@ -31,6 +31,24 @@
#
<%= server_aliases %>

#
# This is the directory people are redirected to if their site is
# empty.
#
Alias /bytemark/ "/usr/share/symbiosis/static/"
<Directory "/usr/share/symbiosis/static/">
DirectoryIndex index.html
AllowOverride All
Require all granted
</Directory>

#
# And this makes that redirection happen.
#
<LocationMatch "^/+$">
Options -Indexes
ErrorDocument 403 /bytemark/
</LocationMatch>

<IfModule ssl_module>
SSLEngine On
Expand Down Expand Up @@ -123,6 +141,25 @@
#
<%= server_aliases %>

#
# This is the directory people are redirected to if their site is
# empty.
#
Alias /bytemark/ "/usr/share/symbiosis/static/"
<Directory "/usr/share/symbiosis/static/">
DirectoryIndex index.html
AllowOverride All
Require all granted
</Directory>

#
# And this makes that redirection happen.
#
<LocationMatch "^/+$">
Options -Indexes
ErrorDocument 403 /bytemark/
</LocationMatch>

% if mandatory_ssl?
<IfModule rewrite_module>
#
Expand Down

0 comments on commit e138f3d

Please sign in to comment.