Merge pull request #175 from mhofer117/patch-1
Fix sample redirect docs
Dieser Commit ist enthalten in:
Commit
13bfe2e0e8
1 geänderte Dateien mit 10 neuen und 3 gelöschten Zeilen
|
@ -4,15 +4,22 @@ Since February the 28th 2017 mailcow does come with port 80 and 443 enabled.
|
|||
|
||||
Open `mailcow.conf` and set `HTTP_BIND=0.0.0.0` - if not already set.
|
||||
|
||||
Open `data/conf/nginx/site.conf` and add the new server config at the top of that file:
|
||||
Create a new file `data/conf/nginx/redirect.conf` and add the following server config to the file:
|
||||
|
||||
```
|
||||
server {
|
||||
root /web;
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
include /etc/nginx/conf.d/server_name.active;
|
||||
server_name _;
|
||||
if ( $request_uri ~* "%0A|%0D" ) { return 403; }
|
||||
return 301 https://$host$uri$is_args$args;
|
||||
location ^~ /.well-known/acme-challenge/ {
|
||||
allow all;
|
||||
default_type "text/plain";
|
||||
}
|
||||
location / {
|
||||
return 301 https://$host$uri$is_args$args;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Laden …
In neuem Issue referenzieren