-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
executable file
·45 lines (40 loc) · 1.31 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 102400;
}
http {
log_format main '$remote_addr | $time_local | "$request" | $status | "$http_x_forwarded_for"';
log_format json escape=json '$remote_addr | $time_local | "$request" | $status | $request_body | "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
server {
# 项目中定义的端口号
listen 4001;
server_name _;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
location / {
root /home/html/;
try_files $uri $uri/ /index.html last;
index index.html;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}