Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yuzhenWang
yd-csf-front
Commits
03dddd55
Commit
03dddd55
authored
May 19, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
0480ece5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
nginx.conf
+8
-0
No files found.
nginx.conf
View file @
03dddd55
...
@@ -11,6 +11,14 @@ server {
...
@@ -11,6 +11,14 @@ server {
root
/usr/share/nginx/html
;
root
/usr/share/nginx/html
;
index
index.html
;
index
index.html
;
location
~
\.mjs$
{
root
/usr/share/nginx/html
;
default_type
application/javascript
;
# 设置默认 MIME 类型
add_header
'Access-Control-Allow-Origin'
'*'
;
expires
1y
;
add_header
Cache-Control
"public,
immutable"
;
}
# 静态资源处理 - 必须放在最前面
# 静态资源处理 - 必须放在最前面
location
~
*
\
.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|map)
$
{
location
~
*
\
.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|map)
$
{
# ✅ 关键:添加 try_files 指令
# ✅ 关键:添加 try_files 指令
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment