-
Notifications
You must be signed in to change notification settings - Fork 24
/
nginx.conf.example
44 lines (39 loc) · 1.17 KB
/
nginx.conf.example
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
#user nobody;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
#gzip on;
gzip on;
gzip_min_length 5k;
gzip_buffers 4 16k;
#gzip_http_version 1.0;
gzip_comp_level 3;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary on;
server {
listen 80;
server_name iast.huoxian.cn;
client_max_body_size 100M;
location / {
root /usr/share/nginx/html; #Site directory
index index.html index.htm; #Add attribute
try_files $uri $uri/ /index.html;
}
location /api/ {
proxy_read_timeout 60;
proxy_pass http://dongtai-webapi:8000/api/;
}
location /upload/ {
proxy_pass http://dongtai-webapi:8000/upload/;
}
location = /50x.html {
root /usr/share/nginx/html;
}
}
}