Commit 6c341aaf authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend: Implement nginx catchall

As result of copying nginx configuration from apache-frontend, it was
NOT adapted to Caddy behaviour. Thus make it so, with catch-all apporach
as in Caddy.

Also update test data, as access logs for main nginx instance is now available.
parent b1e8105b
......@@ -18,7 +18,7 @@ md5sum = 906e5bd66b1265b8109a86b6ab46e91f
[template-apache-frontend]
filename = instance-apache-frontend.cfg
md5sum = 1f7bd1a8e1fd3d77470bc36dcd68a023
md5sum = ba6b8d3b11f4d9809bc0620a05946a16
[template-apache-replicate]
filename = instance-apache-replicate.cfg.in
......@@ -82,7 +82,7 @@ md5sum = 117238225b3fc3c5b5be381815f44c67
[template-nginx-configuration]
filename = templates/nginx.cfg.in
md5sum = 314a55a75b80009123df310b313a5483
md5sum = b1d6bac767db77ad1662edd06aabdf49
[template-nginx-eventsource-slave-virtualhost]
filename = templates/nginx-eventsource-slave.conf.in
......
......@@ -704,6 +704,9 @@ extra-context =
key local_ip nginx-configuration:local_ip
key plain_port nginx-configuration:plain_port
key slave_configuration_directory nginx-configuration:slave-configuration-directory
key error_log nginx-configuration:error_log
key access_log nginx-configuration:access_log
key not_found_file caddy-configuration:not-found-file
[nginx-configuration]
access_log = $${directory:log}/nginx-access.log
......
# Dummy site for starting Caddy correctly
https://www.example.org:{{ port }} {
tls {{ ssl_certificate }} {{ ssl_key }}
bind {{ local_ip }}
# Serve an error 204 (No Content) for favicon.ico
status 204 /favicon.ico
status 404 /
}
http://www.example.org:{{ plain_port }} {
bind {{ local_ip }}
# Serve an error 204 (No Content) for favicon.ico
status 204 /favicon.ico
status 404 /
}
# TODO-Caddy worker_processes $${nginx-configuration:worker_processes};
# TODO-Caddy events {
......@@ -71,3 +56,26 @@ status 404 /
# TODO-Caddy }
import {{ slave_configuration_directory }}/*.conf
:{{ port }} {
tls {{ ssl_certificate }} {{ ssl_key }}
bind {{ local_ip }}
# Serve an error 204 (No Content) for favicon.ico
status 204 /favicon.ico
status 404 /
log / {{ access_log }} "{remote} {>REMOTE_USER} [{when}] \"{method} {uri} {proto}\" {status} {size} \"{>Referer}\" \"{>User-Agent}\" {latency_ms}"
errors {{ error_log }} {
* {{ not_found_file }}
}
}
:{{ plain_port }} {
bind {{ local_ip }}
# Serve an error 204 (No Content) for favicon.ico
status 204 /favicon.ico
status 404 /
log / {{ access_log }} "{remote} {>REMOTE_USER} [{when}] \"{method} {uri} {proto}\" {status} {size} \"{>Referer}\" \"{>User-Agent}\" {latency_ms}"
errors {{ error_log }} {
* {{ not_found_file }}
}
}
......@@ -8,6 +8,7 @@ TestEnableHttp2ByDefaultDefaultSlave-1/var/log/httpd/_enable-http2-false_error_l
TestEnableHttp2ByDefaultDefaultSlave-1/var/log/httpd/_enable-http2-true_access_log
TestEnableHttp2ByDefaultDefaultSlave-1/var/log/httpd/_enable-http2-true_error_log
TestEnableHttp2ByDefaultDefaultSlave-1/var/log/monitor-httpd-error.log
TestEnableHttp2ByDefaultDefaultSlave-1/var/log/nginx-access.log
TestEnableHttp2ByDefaultDefaultSlave-1/var/log/nginx-error.log
TestEnableHttp2ByDefaultDefaultSlave-1/var/log/trafficserver/manager.log
TestEnableHttp2ByDefaultDefaultSlave-1/var/log/trafficserver/traffic.out
\ No newline at end of file
......@@ -8,6 +8,7 @@ TestEnableHttp2ByDefaultFalseSlave-1/var/log/httpd/_enable-http2-false_error_log
TestEnableHttp2ByDefaultFalseSlave-1/var/log/httpd/_enable-http2-true_access_log
TestEnableHttp2ByDefaultFalseSlave-1/var/log/httpd/_enable-http2-true_error_log
TestEnableHttp2ByDefaultFalseSlave-1/var/log/monitor-httpd-error.log
TestEnableHttp2ByDefaultFalseSlave-1/var/log/nginx-access.log
TestEnableHttp2ByDefaultFalseSlave-1/var/log/nginx-error.log
TestEnableHttp2ByDefaultFalseSlave-1/var/log/trafficserver/manager.log
TestEnableHttp2ByDefaultFalseSlave-1/var/log/trafficserver/traffic.out
\ No newline at end of file
......@@ -4,6 +4,7 @@ TestRe6stVerificationUrlDefaultSlave-1/var/log/frontend-error.log
TestRe6stVerificationUrlDefaultSlave-1/var/log/httpd/_default_access_log
TestRe6stVerificationUrlDefaultSlave-1/var/log/httpd/_default_error_log
TestRe6stVerificationUrlDefaultSlave-1/var/log/monitor-httpd-error.log
TestRe6stVerificationUrlDefaultSlave-1/var/log/nginx-access.log
TestRe6stVerificationUrlDefaultSlave-1/var/log/nginx-error.log
TestRe6stVerificationUrlDefaultSlave-1/var/log/trafficserver/manager.log
TestRe6stVerificationUrlDefaultSlave-1/var/log/trafficserver/traffic.out
\ No newline at end of file
......@@ -4,6 +4,7 @@ TestRe6stVerificationUrlSlave-1/var/log/frontend-error.log
TestRe6stVerificationUrlSlave-1/var/log/httpd/_default_access_log
TestRe6stVerificationUrlSlave-1/var/log/httpd/_default_error_log
TestRe6stVerificationUrlSlave-1/var/log/monitor-httpd-error.log
TestRe6stVerificationUrlSlave-1/var/log/nginx-access.log
TestRe6stVerificationUrlSlave-1/var/log/nginx-error.log
TestRe6stVerificationUrlSlave-1/var/log/trafficserver/manager.log
TestRe6stVerificationUrlSlave-1/var/log/trafficserver/traffic.out
\ No newline at end of file
......@@ -4,6 +4,7 @@ TestReplicateSlave-1/var/log/frontend-error.log
TestReplicateSlave-1/var/log/httpd/_replicate_access_log
TestReplicateSlave-1/var/log/httpd/_replicate_error_log
TestReplicateSlave-1/var/log/monitor-httpd-error.log
TestReplicateSlave-1/var/log/nginx-access.log
TestReplicateSlave-1/var/log/nginx-error.log
TestReplicateSlave-1/var/log/trafficserver/manager.log
TestReplicateSlave-1/var/log/trafficserver/traffic.out
\ No newline at end of file
......@@ -64,6 +64,7 @@ TestSlave-1/var/log/httpd/_url_error_log
TestSlave-1/var/log/httpd/_url_https-url_access_log
TestSlave-1/var/log/httpd/_url_https-url_error_log
TestSlave-1/var/log/monitor-httpd-error.log
TestSlave-1/var/log/nginx-access.log
TestSlave-1/var/log/nginx-error.log
TestSlave-1/var/log/trafficserver/manager.log
TestSlave-1/var/log/trafficserver/traffic.out
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment