Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos-caddy
Commits
03428fb3
Commit
03428fb3
authored
Jun 01, 2018
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend: Implement notfound.html on 404
parent
72ac8649
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
16 deletions
+22
-16
software/caddy-frontend/buildout.hash.cfg
software/caddy-frontend/buildout.hash.cfg
+5
-5
software/caddy-frontend/instance-apache-frontend.cfg
software/caddy-frontend/instance-apache-frontend.cfg
+3
-1
software/caddy-frontend/templates/Caddyfile.in
software/caddy-frontend/templates/Caddyfile.in
+10
-9
software/caddy-frontend/templates/apache-custom-slave-list.cfg.in
.../caddy-frontend/templates/apache-custom-slave-list.cfg.in
+1
-0
software/caddy-frontend/templates/template-log-access.conf.in
...ware/caddy-frontend/templates/template-log-access.conf.in
+3
-1
No files found.
software/caddy-frontend/buildout.hash.cfg
View file @
03428fb3
...
...
@@ -19,7 +19,7 @@ md5sum = 906e5bd66b1265b8109a86b6ab46e91f
[template-apache-frontend]
filename = instance-apache-frontend.cfg
md5sum =
a657a0d40ba17d1f8a55602eacdb6c76
md5sum =
c17bd03e23b7ab5f642f43d5fb3f2522
[template-apache-replicate]
filename = instance-apache-replicate.cfg.in
...
...
@@ -27,7 +27,7 @@ md5sum = 361054e6566461e728ee62e2835904f9
[template-slave-list]
filename = templates/apache-custom-slave-list.cfg.in
md5sum =
5e625fd08713d01184e8665aae6759fc
md5sum =
10d3f1a3be413208a8cf8ee6e3d735ed
[template-slave-configuration]
filename = templates/custom-virtualhost.conf.in
...
...
@@ -39,11 +39,11 @@ md5sum = 665e83d660c9b779249b2179d7ce4b4e
[template-caddy-frontend-configuration]
filename = templates/Caddyfile.in
md5sum =
aba04d6e54bdc56c0f2c15fbb712aa3a
md5sum =
2c9d8a41132cc5de31d09ad8af47fa22
[template-custom-slave-list]
filename = templates/apache-custom-slave-list.cfg.in
md5sum =
5e625fd08713d01184e8665aae6759fc
md5sum =
10d3f1a3be413208a8cf8ee6e3d735ed
[template-not-found-html]
filename = templates/notfound.html
...
...
@@ -59,7 +59,7 @@ md5sum = be76c0e96df722dee278077988d869a6
[template-log-access]
filename = templates/template-log-access.conf.in
md5sum =
fae1e2fc29c061f7bbb455b9efb9c3b3
md5sum =
0867232c154e427b9e0f1af7fd694ebb
[template-empty]
filename = templates/empty.in
...
...
software/caddy-frontend/instance-apache-frontend.cfg
View file @
03428fb3
...
...
@@ -201,6 +201,7 @@ extra-context =
key enable_http2_by_default instance-parameter:configuration.enable-http2-by-default
key access_log caddy-configuration:access-log
key error_log caddy-configuration:error-log
key not_found_file caddy-configuration:not-found-file
[dynamic-virtualhost-template-slave]
<= jinja2-template-base
...
...
@@ -242,6 +243,7 @@ extra-context =
key local_ipv4 instance-parameter:ipv4-random
key global_ipv6 slap-network-information:global-ipv6
key error_log caddy-configuration:error-log
key not_found_file caddy-configuration:not-found-file
key username slap-parameter:monitor-username
key password slap-parameter:monitor-password
...
...
@@ -290,7 +292,7 @@ protected-path = /
access-control-string = none
frontend-configuration-verification = $${caddy-wrapper:rendered} -validate > /dev/null
frontend-graceful-command = $${:frontend-configuration-verification}; if [ $? -eq 0 ]; then kill -USR1 $(cat $${:pid-file}); fi
not-found-file = $${caddy-directory:document-root}/notfound.html
# Comunication with ats
cache-port = $${trafficserver-variable:input-port}
cache-through-port = 26011
...
...
software/caddy-frontend/templates/Caddyfile.in
View file @
03428fb3
...
...
@@ -121,7 +121,9 @@ import {{ slave_with_cache_configuration_directory }}/*.conf
# TODO-Caddy LogLevel notice
# TODO-Caddy LogFormat "%h %l %{REMOTE_USER}i %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %D" combined
log / {{ access_log }} {combined}
errors {{ error_log }}
errors {{ error_log }} {
* {{ not_found_file }}
}
}
https://[{{ global_ipv6 }}]:{{ https_port }}/server-status, https://{{ local_ipv4 }}:{{ https_port }}/server-status {
...
...
@@ -136,17 +138,16 @@ https://[{{ global_ipv6 }}]:{{ https_port }}/server-status, https://{{ local_ipv
# TODO-Caddy LogLevel notice
# TODO-Caddy LogFormat "%h %l %{REMOTE_USER}i %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %D" combined
log / {{ access_log }} {combined}
errors {{ error_log }}
errors {{ error_log }} {
* {{ not_found_file }}
}
}
:{{ http_port }} {
bind {{ local_ipv4 }}
status 404 /
# TODO-Caddy LogLevel notice
# TODO-Caddy LogFormat "%h %l %{REMOTE_USER}i %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %D" combined
log / {{ access_log }} {combined
}
errors {{ error_log }
}
log / {{ access_log }} "{remote} {>REMOTE_USER} [{when}] \"{method} {uri} {proto}\" {status} {size} \"{>Referer}\" \"{>User-Agent}\" {latency_ms}"
errors {{ error_log }} {
* {{ not_found_file }
}
}
}
# TODO-Caddy ErrorDocument 404 /notfound.html
# TODO-Caddy RewriteRule (.*) /notfound.html [R=404,L]
software/caddy-frontend/templates/apache-custom-slave-list.cfg.in
View file @
03428fb3
...
...
@@ -380,6 +380,7 @@ extra-context =
raw login_key {{ login_key }}
raw access_log {{ access_log }}
raw error_log {{ error_log }}
raw not_found_file {{ not_found_file }}
{# Publish information for the instance #}
[publish-caddy-information]
...
...
software/caddy-frontend/templates/template-log-access.conf.in
View file @
03428fb3
...
...
@@ -11,6 +11,8 @@ https://[{{ global_ipv6 }}]:{{ https_port }}/{{ slave }}, https://{{ local_ipv4
# TODO-Caddy LogLevel notice
# TODO-Caddy LogFormat "%h %l %{REMOTE_USER}i %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %D" combined
log / {{ access_log }} {combined}
errors {{ error_log }}
errors {{ error_log }} {
* {{ not_found_file }}
}
}
{% endfor %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment