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
fcb1a7b3
Commit
fcb1a7b3
authored
Jul 24, 2025
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
4bfd3389
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
nginx.conf
+19
-10
No files found.
nginx.conf
View file @
fcb1a7b3
# nginx.conf (调试版)
server
{
listen
8333
;
server_name
localhost
;
...
...
@@ -6,19 +5,29 @@ server {
root
/usr/share/nginx/html
;
index
index.html
;
# 详细错误日志
access_log
/var/log/nginx/access.log
;
error_log
/var/log/nginx/error.log
debug
;
# 开启debug日志
location
/
{
try_files
$uri
$uri
/
/index.html
;
add_header
Cache-Control
"no-store,
no-cache,
must-revalidate"
;
# 禁用缓存
}
location
/cffp/
{
alias
/usr/share/nginx/html/
;
try_files
$uri
$uri
/
/cffp/index.html
;
}
# 临时允许目录列表(调试用)
autoindex
on
;
# 禁止访问 .env 文件
location
~
/\.env
{
deny
all
;
return
404
;
}
# 防止vue-router路由被缓存
location
~
*
\
.(html)
$
{
add_header
Cache-Control
"no-cache,
must-revalidate"
;
# 错误处理
error_page
500
502
503
504
/50x.html
;
location
=
/50x.html
{
root
/usr/share/nginx/html
;
}
# 访问日志
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