-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.conf
More file actions
34 lines (27 loc) · 884 Bytes
/
Copy pathdefault.conf
File metadata and controls
34 lines (27 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
server_names_hash_bucket_size 64;
server {
listen 80; # listen for ipv4
#listen 443 default_server; # listen for ipv4
listen [::]:80 default ipv6only=on; # listen for ipv6
#listen [::]:443 default ipv6only=on; # listen for ipv6
server_tokens off; # disable the Server nginx header
server_name _; # all hostnames
# if it contains the www, remove it and redirect
if ($host ~* ^www\.(.*)$) {
set $without_www $1;
rewrite . https://$without_www$request_uri permanent;
}
return 301 https://www.$host$request_uri; # to https
}
server {
listen 80;
listen 443;
server_name gmk-congress.com www.gmk-congress.com;
return 301 https://www.geomechanics-congress.com;
}
server {
listen 80;
listen 443;
server_name isrm2023.com www.isrm2023.com;
return 301 https://www.isrm2023.info;
}