-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
+++ | ||
title = "nginx摘要" | ||
date = "2024-10-12" | ||
+++ | ||
|
||
```conf | ||
server { | ||
location ~ /\.DS_Store { | ||
deny all; | ||
access_log off; | ||
log_not_found off; | ||
} | ||
add_header Content-Security-Policy | ||
"default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self' *;"; | ||
add_header X-Frame-Options DENY; | ||
listen 8020; | ||
server_name localhost; | ||
error_page 405 =200 $uri; | ||
location / { | ||
root /app/xzfw/car-moa-ui; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
} | ||
``` | ||
|
||
```conf | ||
nginx -s reload | ||
``` |