Skip to content

Commit

Permalink
nginx摘要
Browse files Browse the repository at this point in the history
  • Loading branch information
horaoen committed Nov 13, 2024
1 parent 3257cd3 commit 6cd194f
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions content/posts/nginx.md
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
```

0 comments on commit 6cd194f

Please sign in to comment.