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