-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathnginx.conf
39 lines (32 loc) · 1.56 KB
/
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
worker_processes 1;
daemon off;
error_log stderr;
events { worker_connections 1024; }
http {
charset utf-8;
log_format cloudfoundry 'NginxLog "$request" $status $body_bytes_sent';
access_log /dev/stdout cloudfoundry;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
keepalive_timeout 30;
port_in_redirect off; # Ensure that redirects don't include the internal container PORT - <%= ENV["PORT"] %>
map $uri $new_uri {
/content-guide/content-structure/ https://www.stylemanual.gov.au/format-writing-and-structure/structure;
/content-guide/writing-style/ https://www.stylemanual.gov.au/format-writing-and-structure/clear-language-and-writing-style;
/content-guide/accessibility-inclusivity/ https://www.stylemanual.gov.au/user-needs/understanding-needs;
/content-guide/punctuation-grammar/ https://www.stylemanual.gov.au/style-rules-and-conventions;
/content-guide/terms-phrases/ https://www.stylemanual.gov.au/style-rules-and-conventions/names-and-terms;
/content-guide/numbers-measurements/ https://www.stylemanual.gov.au/style-rules-and-conventions/numbers-and-measurements;
/content-guide/formatting/ https://www.stylemanual.gov.au/style-rules-and-conventions/general-conventions-editing-and-proofreading;
/content-guide/types-of-content/ https://www.stylemanual.gov.au/format-writing-and-structure/content-formats;
/content-guide/search-engines/ https://www.stylemanual.gov.au/format-writing-and-structure/findable-content;
}
server {
listen {{port}};
if ( $new_uri ) {
return 301 $new_uri;
}
return 301 https://www.stylemanual.gov.au/;
}
}