nginx.conf 577 Bytes
Newer Older
Javier Arias's avatar
Javier Arias committed
1 2
server {
    listen 80;
ι™ˆεΈ…'s avatar
ι™ˆεΈ… committed
3 4 5
    # gzip config
    gzip on;
    gzip_min_length 1k;
yidreamc's avatar
yidreamc committed
6
    gzip_comp_level 9;
EcmaProSrc.P/ka's avatar
EcmaProSrc.P/ka committed
7
    gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml;
ι™ˆεΈ…'s avatar
ι™ˆεΈ… committed
8 9
    gzip_vary on;
    gzip_disable "MSIE [1-6]\.";
Javier Arias's avatar
Javier Arias committed
10 11 12 13 14 15

    root /usr/share/nginx/html;

    location / {
        try_files $uri $uri/ /index.html;
    }
ι™ˆεΈ…'s avatar
ι™ˆεΈ… committed
16 17 18 19 20
    location /api {
        proxy_pass https://preview.pro.ant.design;
        proxy_set_header   X-Forwarded-Proto $scheme;
        proxy_set_header   X-Real-IP         $remote_addr;
    }
Javier Arias's avatar
Javier Arias committed
21
}