Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
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
0
Merge Requests
0
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
Chao Sun
CFFP-HB
Commits
2ed629ac
Commit
2ed629ac
authored
Jul 24, 2025
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
17c31fdb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
24 deletions
+11
-24
nginx.conf
+11
-24
No files found.
nginx.conf
View file @
2ed629ac
...
...
@@ -5,42 +5,29 @@ server {
root
/usr/share/nginx/html
;
index
index.html
;
# 禁用缓存确保获取最新资源
add_header
Cache-Control
"no-store,
no-cache,
must-revalidate,
proxy-revalidate"
;
add_header
Pragma
"no-cache"
;
expires
0
;
# Vue路由模式支持
location
/
{
try_files
$uri
$uri
/
/index.html
;
add_header
Cache-Control
"no-store,
no-cache,
must-revalidate"
;
# 禁用缓存
}
# 匹配manifest.json中的base路径
location
/cffp/
{
alias
/usr/share/nginx/html/
;
try_files
$uri
$uri
/
/cffp/index.html
;
}
# 代理API请求
location
/cffpApi
{
proxy_pass
http://cffpApi
;
proxy_set_header
Host
$host
;
proxy_set_header
X-Real-IP
$remote_addr
;
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for
;
}
# 错误日志
access_log
/var/log/nginx/access.log
;
error_log
/var/log/nginx/error.log
;
# 错误页面
error_page
404
/404.html
;
location
=
/404.html
{
internal
;
# 禁止访问 .env 文件
location
~
/\.env
{
deny
all
;
return
404
;
}
# 错误处理
error_page
500
502
503
504
/50x.html
;
location
=
/50x.html
{
interna
l
;
root
/usr/share/nginx/htm
l
;
}
# 访问日志
access_log
/var/log/nginx/access.log
;
error_log
/var/log/nginx/error.log
;
}
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