nginx
This commit is contained in:
parent
a2b4212af5
commit
94c8351994
23
nginx.conf
23
nginx.conf
@ -3,23 +3,18 @@ server {
|
||||
server_name localhost;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
add_header Cache-Control "no-cache";
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
location /_nuxt/ {
|
||||
expires 1y;
|
||||
|
||||
location = / {
|
||||
try_files /index.html =404;
|
||||
}
|
||||
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
||||
expires max;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
location ~ /\. {
|
||||
deny all;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
export default defineNuxtConfig({
|
||||
app: {
|
||||
baseURL: '/',
|
||||
buildAssetsDir: '/_nuxt/',
|
||||
head: {
|
||||
title: 'Freekake Admin',
|
||||
titleTemplate: '%s | Freekake Admin',
|
||||
@ -49,6 +50,9 @@ export default defineNuxtConfig({
|
||||
},
|
||||
|
||||
vite: {
|
||||
server: {
|
||||
hmr: false
|
||||
},
|
||||
optimizeDeps: { include: ['quill'] },
|
||||
},
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user