Skip to content

Commit 3c3580a

Browse files
BimonBimon
authored andcommitted
avoid 400 bad request error if ssl is enabled and interface is accessed with http instead of https. Instead redirect to the requested page with https at the beginning of the URL.
According to FS#1982
1 parent 3a93f27 commit 3c3580a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

install/tpl/nginx_ispconfig.vhost.master

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
server {
22
listen {vhost_port};
3-
ssl {ssl_on};
3+
ssl {ssl_on};
44
{ssl_comment}ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;
55
{ssl_comment}ssl_certificate_key /usr/local/ispconfig/interface/ssl/ispserver.key;
6+
7+
# redirect to https if accessed with http
8+
{ssl_comment}error_page 497 https://$host:{vhost_port}$request_uri;
69

710
server_name _;
811

0 commit comments

Comments
 (0)