-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx.conf
46 lines (38 loc) · 936 Bytes
/
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
46
worker_processes auto;
worker_cpu_affinity auto;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
#daemon off;
events {
worker_connections 1024;
}
http {
# rewrite_log on;
include mime.types;
default_type application/json;
access_log /var/log/nginx/access.log;
sendfile on;
# tcp_nopush on;
keepalive_timeout 3;
# tcp_nodelay on;
gzip on;
client_max_body_size 1m;
server {
listen 80 default_server;
server_name _;
absolute_redirect off;
error_page 404 403 /404/;
location =/blog/ {
return 302 /blog/page/1/;
}
location =/feed {
return 302 /feed.rss;
}
location / {
charset utf-8;
index index.html;
root /var/www/html;
try_files $uri $uri/ =404;
}
}
}