This repository has been archived by the owner on Feb 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
58 lines (51 loc) · 1.51 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
46
47
48
49
50
51
52
53
54
55
56
57
58
server
{
listen 80;
server_name naitokoa.com www.naitokoa.com;
index index.php index.html index.htm default.php default.htm default.html;
root /www/wwwroot/naitokoa.com/public;
location /error.html {
internal;
}
#error_page 404 502 =200 /error.html;
location / {
proxy_pass http://localhost:3010;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_intercept_errors on;
error_page 404 502 =200 /error.html;
}
# Forbidden files or directories
location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
{
return 404;
}
# Directory verification related settings for one-click application for SSL certificate
location ~ \.well-known{
allow all;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
root /www/wwwroot/naitokoa.com/public;
expires 30d;
error_log off;
access_log off;
}
location ~ .*\.(html)$
{
root /www/wwwroot/naitokoa.com;
error_log off;
access_log off;
}
location ~ .*\.(js|css)?$
{
expires 12h;
error_log off;
access_log off;
}
access_log /www/wwwlogs/naitokoa.com.log;
error_log /www/wwwlogs/naitokoa.com.error.log;
}