1
1
# /etc/nginx/nginx.conf
2
- user nginx;
3
- worker_processes auto;
2
+ user nginx;
3
+ worker_processes auto;
4
4
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;
7
7
8
8
events {
9
- worker_connections 1024 ;
9
+ worker_connections 1024 ;
10
10
}
11
11
12
12
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;
15
15
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 "' ;
19
19
20
- access_log /var/log/nginx/access.log main ;
20
+ access_log /var/log/nginx/access.log main ;
21
21
22
- sendfile on ;
23
- keepalive_timeout 65 ;
22
+ sendfile on ;
23
+ keepalive_timeout 65 ;
24
24
25
25
# 启用 Gzip 压缩
26
26
gzip on ;
@@ -34,21 +34,21 @@ http {
34
34
gzip_disable "MSIE [1-6]\." ;
35
35
36
36
server {
37
- listen 80 ;
38
- server_name localhost;
37
+ listen 80 ;
38
+ server_name localhost;
39
39
40
40
# 博客前台
41
41
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;
44
44
}
45
45
46
46
# 博客后台
47
47
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;
50
50
}
51
-
51
+
52
52
# WebSocket
53
53
location /ws/ {
54
54
proxy_pass http://blog-server:8889/;
@@ -68,11 +68,11 @@ http {
68
68
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
69
69
}
70
70
71
- # 网易云音乐 代理
72
- location /minio/ {
73
- proxy_pass http://minio:9000/ ;
71
+ # minio
72
+ location /blog-images {
73
+ proxy_pass http://minio:9000;
74
74
}
75
-
75
+
76
76
# gitee 代理
77
77
location /gitee/ {
78
78
proxy_pass https://gitee.com/mrzym/;
0 commit comments