質問編集履歴
1
nginx.confを掲載
test
CHANGED
File without changes
|
test
CHANGED
@@ -51,3 +51,137 @@
|
|
51
51
|
|
52
52
|
|
53
53
|
至らぬ点はサーバー初心者故、ご容赦ください。
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
## 追記
|
58
|
+
|
59
|
+
// nginx.conf
|
60
|
+
|
61
|
+
```
|
62
|
+
|
63
|
+
## nginx.conf
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
user httpd www;
|
68
|
+
|
69
|
+
worker_processes auto;
|
70
|
+
|
71
|
+
worker_rlimit_nofile 20000;
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
error_log /var/log/nginx/error.log warn;
|
78
|
+
|
79
|
+
pid /var/run/nginx.pid;
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
events {
|
84
|
+
|
85
|
+
worker_connections 4096;
|
86
|
+
|
87
|
+
multi_accept on;
|
88
|
+
|
89
|
+
use epoll;
|
90
|
+
|
91
|
+
}
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
http {
|
96
|
+
|
97
|
+
server_tokens off;
|
98
|
+
|
99
|
+
include /etc/nginx/mime.types;
|
100
|
+
|
101
|
+
default_type application/octet-stream;
|
102
|
+
|
103
|
+
charset UTF-8;
|
104
|
+
|
105
|
+
server_names_hash_bucket_size 128;
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
log_format main '$request_time $sent_http_x_f_cache $sent_http_x_b_cache '
|
110
|
+
|
111
|
+
'$remote_addr - $remote_user [$time_local] "$request" '
|
112
|
+
|
113
|
+
'$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"';
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
access_log /var/log/nginx/access.log main;
|
118
|
+
|
119
|
+
client_max_body_size 20M;
|
120
|
+
|
121
|
+
client_body_buffer_size 768k;
|
122
|
+
|
123
|
+
sendfile on;
|
124
|
+
|
125
|
+
tcp_nopush on;
|
126
|
+
|
127
|
+
tcp_nodelay on;
|
128
|
+
|
129
|
+
keepalive_timeout 5;
|
130
|
+
|
131
|
+
connection_pool_size 1024;
|
132
|
+
|
133
|
+
request_pool_size 8k;
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
gzip on;
|
138
|
+
|
139
|
+
gzip_http_version 1.0;
|
140
|
+
|
141
|
+
gzip_disable "msie6";
|
142
|
+
|
143
|
+
gzip_proxied any;
|
144
|
+
|
145
|
+
gzip_min_length 1024;
|
146
|
+
|
147
|
+
gzip_comp_level 2;
|
148
|
+
|
149
|
+
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript application/json;
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
brotli on;
|
154
|
+
|
155
|
+
brotli_static on;
|
156
|
+
|
157
|
+
brotli_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript application/json;
|
158
|
+
|
159
|
+
brotli_comp_level 3;
|
160
|
+
|
161
|
+
brotli_min_length 1024;
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
open_file_cache max=100000 inactive=20s;
|
166
|
+
|
167
|
+
open_file_cache_valid 30s;
|
168
|
+
|
169
|
+
open_file_cache_min_uses 2;
|
170
|
+
|
171
|
+
open_file_cache_errors on;
|
172
|
+
|
173
|
+
fastcgi_cache_path /var/cache/nginx/wordpress levels=1:2 keys_zone=wpcache:30m max_size=512M inactive=600m;
|
174
|
+
|
175
|
+
fastcgi_ignore_headers "Vary" "Cache-Control" "Expires";
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
include /etc/nginx/conf.d/*.conf;
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
}
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
```
|