Skip to content

Commit 04c6d6a

Browse files
author
19983467897
committed
feat: 更新代码
1 parent efc3351 commit 04c6d6a

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

blog-server/nginx.conf

+24-24
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
# /etc/nginx/nginx.conf
2-
user nginx;
3-
worker_processes auto;
2+
user nginx;
3+
worker_processes auto;
44

5-
error_log /var/log/nginx/error.log notice;
6-
pid /var/run/nginx.pid;
5+
error_log /var/log/nginx/error.log notice;
6+
pid /var/run/nginx.pid;
77

88
events {
9-
worker_connections 1024;
9+
worker_connections 1024;
1010
}
1111

1212
http {
13-
include /etc/nginx/mime.types;
14-
default_type application/octet-stream;
13+
include /etc/nginx/mime.types;
14+
default_type application/octet-stream;
1515

16-
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
17-
'$status $body_bytes_sent "$http_referer" '
18-
'"$http_user_agent" "$http_x_forwarded_for"';
16+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
17+
'$status $body_bytes_sent "$http_referer" '
18+
'"$http_user_agent" "$http_x_forwarded_for"';
1919

20-
access_log /var/log/nginx/access.log main;
20+
access_log /var/log/nginx/access.log main;
2121

22-
sendfile on;
23-
keepalive_timeout 65;
22+
sendfile on;
23+
keepalive_timeout 65;
2424

2525
# 启用 Gzip 压缩
2626
gzip on;
@@ -34,21 +34,21 @@ http {
3434
gzip_disable "MSIE [1-6]\.";
3535

3636
server {
37-
listen 80;
38-
server_name localhost;
37+
listen 80;
38+
server_name localhost;
3939

4040
# 博客前台
4141
location / {
42-
root /usr/share/nginx/html/blog;
43-
index index.html index.htm;
42+
root /usr/share/nginx/html/blog;
43+
index index.html index.htm;
4444
}
4545

4646
# 博客后台
4747
location /admin {
48-
alias /usr/share/nginx/html/admin;
49-
index index.html index.htm;
48+
alias /usr/share/nginx/html/admin;
49+
index index.html index.htm;
5050
}
51-
51+
5252
# WebSocket
5353
location /ws/ {
5454
proxy_pass http://blog-server:8889/;
@@ -68,11 +68,11 @@ http {
6868
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
6969
}
7070

71-
# 网易云音乐 代理
72-
location /minio/ {
73-
proxy_pass http://minio:9000/;
71+
# minio
72+
location /blog-images {
73+
proxy_pass http://minio:9000;
7474
}
75-
75+
7676
# gitee 代理
7777
location /gitee/ {
7878
proxy_pass https://gitee.com/mrzym/;

0 commit comments

Comments
 (0)