-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx.base.conf
38 lines (32 loc) · 919 Bytes
/
nginx.base.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
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name mirea.xyz www.mirea.xyz ipv4.mirea.xyz ipv6.mirea.xyz;
root /var/www/frontend/dist/;
# SSL
ssl_certificate certs/cert.pem;
ssl_certificate_key certs/key.pem;
# restrict methods
if ($request_method !~ ^(GET|POST|HEAD|CONNECT|OPTIONS)$) {
return '405';
}
# redirect redoc
location ~* ^/docs/api/redoc$ {
return 301 https://$host/docs/api/redoc.html;
}
# index.html fallback
location / {
try_files $uri /index.html;
}
# reverse proxy
location /api {
proxy_pass http://127.0.0.1:5061;
}
}
# HTTP redirect
server {
listen 80;
listen [::]:80;
server_name mirea.xyz www.mirea.xyz ipv4.mirea.xyz ipv6.mirea.xyz;
return 301 https://$server_name$request_uri;
}