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
6dba1a32
Commit
6dba1a32
authored
Jul 23, 2025
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
d1f146cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
nginx.conf
+20
-20
No files found.
nginx.conf
View file @
6dba1a32
# nginx.conf (调试版)
server
{
server
{
listen
8333
;
listen
8333
;
server_name
localhost
;
server_name
localhost
;
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
/
{
location
/
{
root
/usr/share/nginx/html
;
try_files
$uri
$uri
/
/index.html
;
index
index.html
;
try_files
$uri
$uri
/
/index.html
;
# 处理Vue路由history模式
# 临时允许目录列表(调试用)
if
(
$request_method
=
OPTIONS)
{
autoindex
on
;
add_header
'Access-Control-Allow-Origin'
'*'
;
}
add_header
'Access-Control-Allow-Methods'
'GET,
POST,
PUT,
DELETE,
OPTIONS'
;
add_header
'Access-Control-Allow-Headers'
'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'
;
add_header
'Access-Control-Max-Age'
1728000
;
add_header
'Content-Type'
'text/plain
charset=UTF-8'
;
add_header
'Content-Length'
0
;
return
204
;
}
limit_except
GET
POST
PUT
DELETE
OPTIONS
{
deny
all
;
}
}
# 防止vue-router路由被缓存
location
~
*
\
.(html)
$
{
add_header
Cache-Control
"no-cache,
must-revalidate"
;
}
}
}
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