-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathnginx.conf
47 lines (36 loc) · 958 Bytes
/
nginx.conf
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
35
36
37
38
39
40
41
42
43
44
45
46
47
events {
worker_connections 4096; ## Default: 1024
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
include /etc/nginx/conf.d/*.conf;
# if www, redirect to non-www
server {
listen 80;
server_name www.msdevshow.com;
return 301 https://msdevshow.com$request_uri;
}
#prod
server {
listen 80;
server_name msdevshow.com;
#force SSL
if ($http_x_arr_ssl = "") {
return 301 https://$host$request_uri;
}
rewrite ^/2018/01/ces-2019-and-travel-gear/$ https://msdevshow.com/2019/01/ces-2019-and-travel-gear/ permanent;
try_files $uri $uri/index.html $uri/index.xml =404;
error_page 404 /404.html;
root /usr/share/nginx/html;
}
#dev/test
server {
listen 80 default_server;
#server_name _;
try_files $uri $uri/index.html $uri/index.xml =404;
error_page 404 /404.html;
root /usr/share/nginx/html;
}
}