include non ssl server names in SSL server block. fixes #2086
This commit is contained in:
1 parent
95993955c5
commit
db94fcb6b4
2 files changed
+10
No files matched your search
@@ -2,6 +2,7 @@ server {
|
|||||||
listen [::]:{{ .NGINX_SSL_PORT }} ssl spdy;
|
listen [::]:{{ .NGINX_SSL_PORT }} ssl spdy;
|
||||||
listen {{ .NGINX_SSL_PORT }} ssl spdy;
|
listen {{ .NGINX_SSL_PORT }} ssl spdy;
|
||||||
{{ if .SSL_SERVER_NAME }}server_name {{ .SSL_SERVER_NAME }}; {{ end }}
|
{{ if .SSL_SERVER_NAME }}server_name {{ .SSL_SERVER_NAME }}; {{ end }}
|
||||||
|
{{ if .NOSSL_SERVER_NAME }}server_name {{ .NOSSL_SERVER_NAME }}; {{ end }}
|
||||||
{{ include "log.config" . }}
|
{{ include "log.config" . }}
|
||||||
ssl_certificate {{ .APP_SSL_PATH }}/server.crt;
|
ssl_certificate {{ .APP_SSL_PATH }}/server.crt;
|
||||||
ssl_certificate_key {{ .APP_SSL_PATH }}/server.key;
|
ssl_certificate_key {{ .APP_SSL_PATH }}/server.key;
|
||||||
|
|||||||
@@ -41,6 +41,15 @@ assert_error_log() {
|
|||||||
assert_error_log ${TEST_APP}
|
assert_error_log ${TEST_APP}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "(nginx-vhosts) nginx:build-config (with SSL & unrelated domain)" {
|
||||||
|
setup_test_tls
|
||||||
|
add_domain "node-js-app.dokku.me"
|
||||||
|
add_domain "test.dokku.me"
|
||||||
|
deploy_app
|
||||||
|
assert_ssl_domain "node-js-app.dokku.me"
|
||||||
|
assert_http_redirect "http://test.dokku.me" "https://test.dokku.me:443/"
|
||||||
|
}
|
||||||
|
|
||||||
@test "(nginx-vhosts) nginx:build-config (wildcard SSL)" {
|
@test "(nginx-vhosts) nginx:build-config (wildcard SSL)" {
|
||||||
setup_test_tls wildcard
|
setup_test_tls wildcard
|
||||||
add_domain "wildcard1.dokku.me"
|
add_domain "wildcard1.dokku.me"
|
||||||
|
|||||||
Reference in new issue
Block a user