質問編集履歴
1
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -12,4 +12,68 @@
|
|
12
12
|
|
13
13
|
https://teratail.com/questions/261397
|
14
14
|
この記事が自分とそっくりなのでっすが、解決方法がなく困っております。
|
15
|
-
どなたかよろしくお願いします。
|
15
|
+
どなたかよろしくお願いします。
|
16
|
+
|
17
|
+
```
|
18
|
+
user nginx;
|
19
|
+
worker_processes auto;
|
20
|
+
error_log /var/log/nginx/error.log;
|
21
|
+
pid /run/nginx.pid;
|
22
|
+
|
23
|
+
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
|
24
|
+
include /usr/share/nginx/modules/*.conf;
|
25
|
+
|
26
|
+
events {
|
27
|
+
worker_connections 1024;
|
28
|
+
}
|
29
|
+
|
30
|
+
http {
|
31
|
+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
32
|
+
'$status $body_bytes_sent "$http_referer" '
|
33
|
+
'"$http_user_agent" "$http_x_forwarded_for"';
|
34
|
+
|
35
|
+
access_log /var/log/nginx/access.log main;
|
36
|
+
|
37
|
+
sendfile on;
|
38
|
+
tcp_nopush on;
|
39
|
+
tcp_nodelay on;
|
40
|
+
keepalive_timeout 65;
|
41
|
+
types_hash_max_size 4096;
|
42
|
+
|
43
|
+
include /etc/nginx/mime.types;
|
44
|
+
default_type application/octet-stream;
|
45
|
+
|
46
|
+
# Load modular configuration files from the /etc/nginx/conf.d directory.
|
47
|
+
# See http://nginx.org/en/docs/ngx_core_module.html#include
|
48
|
+
# for more information.
|
49
|
+
include /etc/nginx/conf.d/*.conf;
|
50
|
+
|
51
|
+
|
52
|
+
server {
|
53
|
+
listen 80;
|
54
|
+
listen [::]:80;
|
55
|
+
server_name _;
|
56
|
+
root /var/www/outputer/public/;
|
57
|
+
index index.php index.html index.htm;
|
58
|
+
# Load configuration files for the default server block.
|
59
|
+
include /etc/nginx/default.d/*.conf;
|
60
|
+
|
61
|
+
error_page 404 /404.html;
|
62
|
+
location = /40x.html {
|
63
|
+
}
|
64
|
+
|
65
|
+
error_page 500 502 503 504 /50x.html;
|
66
|
+
location = /50x.html {
|
67
|
+
try_files $uri $uri/ /index.php$is_args$args;
|
68
|
+
|
69
|
+
}
|
70
|
+
location ~ .php$ {
|
71
|
+
try_files $uri /index.php =404;
|
72
|
+
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
73
|
+
fastcgi_index index.php;
|
74
|
+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
75
|
+
include fastcgi_params;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
```
|