質問編集履歴
1
nginx.confを掲載
title
CHANGED
File without changes
|
body
CHANGED
@@ -24,4 +24,71 @@
|
|
24
24
|
|
25
25
|
まだ空のドメインを持っていないのでバーチャルホストの設定確認はできませんが、サーバーのIPにブラウザで接続したときに、指定のディレクトリのindex.html / index.php を表示したいのですが、どのようにすればできるでしょうか?
|
26
26
|
|
27
|
-
至らぬ点はサーバー初心者故、ご容赦ください。
|
27
|
+
至らぬ点はサーバー初心者故、ご容赦ください。
|
28
|
+
|
29
|
+
## 追記
|
30
|
+
// nginx.conf
|
31
|
+
```
|
32
|
+
## nginx.conf
|
33
|
+
|
34
|
+
user httpd www;
|
35
|
+
worker_processes auto;
|
36
|
+
worker_rlimit_nofile 20000;
|
37
|
+
|
38
|
+
|
39
|
+
error_log /var/log/nginx/error.log warn;
|
40
|
+
pid /var/run/nginx.pid;
|
41
|
+
|
42
|
+
events {
|
43
|
+
worker_connections 4096;
|
44
|
+
multi_accept on;
|
45
|
+
use epoll;
|
46
|
+
}
|
47
|
+
|
48
|
+
http {
|
49
|
+
server_tokens off;
|
50
|
+
include /etc/nginx/mime.types;
|
51
|
+
default_type application/octet-stream;
|
52
|
+
charset UTF-8;
|
53
|
+
server_names_hash_bucket_size 128;
|
54
|
+
|
55
|
+
log_format main '$request_time $sent_http_x_f_cache $sent_http_x_b_cache '
|
56
|
+
'$remote_addr - $remote_user [$time_local] "$request" '
|
57
|
+
'$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"';
|
58
|
+
|
59
|
+
access_log /var/log/nginx/access.log main;
|
60
|
+
client_max_body_size 20M;
|
61
|
+
client_body_buffer_size 768k;
|
62
|
+
sendfile on;
|
63
|
+
tcp_nopush on;
|
64
|
+
tcp_nodelay on;
|
65
|
+
keepalive_timeout 5;
|
66
|
+
connection_pool_size 1024;
|
67
|
+
request_pool_size 8k;
|
68
|
+
|
69
|
+
gzip on;
|
70
|
+
gzip_http_version 1.0;
|
71
|
+
gzip_disable "msie6";
|
72
|
+
gzip_proxied any;
|
73
|
+
gzip_min_length 1024;
|
74
|
+
gzip_comp_level 2;
|
75
|
+
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript application/json;
|
76
|
+
|
77
|
+
brotli on;
|
78
|
+
brotli_static on;
|
79
|
+
brotli_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript application/json;
|
80
|
+
brotli_comp_level 3;
|
81
|
+
brotli_min_length 1024;
|
82
|
+
|
83
|
+
open_file_cache max=100000 inactive=20s;
|
84
|
+
open_file_cache_valid 30s;
|
85
|
+
open_file_cache_min_uses 2;
|
86
|
+
open_file_cache_errors on;
|
87
|
+
fastcgi_cache_path /var/cache/nginx/wordpress levels=1:2 keys_zone=wpcache:30m max_size=512M inactive=600m;
|
88
|
+
fastcgi_ignore_headers "Vary" "Cache-Control" "Expires";
|
89
|
+
|
90
|
+
include /etc/nginx/conf.d/*.conf;
|
91
|
+
|
92
|
+
}
|
93
|
+
|
94
|
+
```
|