-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathnginx.conf
52 lines (43 loc) · 1.05 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
40
41
42
43
44
45
46
47
48
49
50
51
52
events {}
http {
include mime.types;
error_log /dev/stdout info;
include /etc/nginx/sites-enabled/*;
server {
access_log /dev/stdout;
listen 8080;
root /usr/share/nginx/html;
index index.html;
ssi on;
ssi_types text/html;
location / {
ssi on;
try_files $uri $uri/ =404;
}
location /remote_stage {
rewrite ^/remote_stage/(.*)$ /$1 break;
proxy_pass https://developers.stage.redhat.com;
}
location /remote {
rewrite ^/remote/(.*)$ /$1 break;
proxy_pass https://developers.redhat.com;
}
location ~* \.(css|js|png|jpg|jpeg|gif|ico|woff2?|ttf|svg|eot)$ {
expires max;
log_not_found off;
}
location ~ \.html$ {
ssi on;
try_files $uri $uri/ =404;
}
location ~ \.css {
# add_header Content-Type text/css;
}
# nested routes
rewrite ^/api-catalog/api/(.*)$ /api/$1.html last;
# other assets like JS and CSS
rewrite ^/api-catalog(.+)$ $1 last;
# index route
rewrite ^/api-catalog$ / last;
}
}