26 lines
473 B
Nginx Configuration File
26 lines
473 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# 默认重定向到 /site/
|
|
location = / {
|
|
return 302 /site/;
|
|
}
|
|
|
|
location = /index.html {
|
|
return 302 /site/;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
# 针对静态资源开启 gzip
|
|
gzip on;
|
|
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
|
|
gzip_min_length 1024;
|
|
}
|