質問編集履歴
1
nginxの設定を追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -73,4 +73,97 @@
|
|
73
73
|
* vagrant 1.9.7
|
74
74
|
* bento/ubuntu-16.04
|
75
75
|
* Docker version 17.06.2-ce, build cec0b72
|
76
|
-
* docker-compose version 1.16.1, build 6d1ac21
|
76
|
+
* docker-compose version 1.16.1, build 6d1ac21
|
77
|
+
|
78
|
+
##### 追記・サーバ設定
|
79
|
+
|
80
|
+
修正依頼ありがとうございます。nginxの設定ファイルは以下になります。
|
81
|
+
配布コンテナから特に変更はしていません。
|
82
|
+
|
83
|
+
/etc/nginx/nginx.conf
|
84
|
+
|
85
|
+
```config
|
86
|
+
|
87
|
+
user nginx;
|
88
|
+
worker_processes 1;
|
89
|
+
|
90
|
+
error_log /var/log/nginx/error.log warn;
|
91
|
+
pid /var/run/nginx.pid;
|
92
|
+
|
93
|
+
|
94
|
+
events {
|
95
|
+
worker_connections 1024;
|
96
|
+
}
|
97
|
+
|
98
|
+
|
99
|
+
http {
|
100
|
+
include /etc/nginx/mime.types;
|
101
|
+
default_type application/octet-stream;
|
102
|
+
|
103
|
+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
104
|
+
'$status $body_bytes_sent "$http_referer" '
|
105
|
+
'"$http_user_agent" "$http_x_forwarded_for"';
|
106
|
+
|
107
|
+
access_log /var/log/nginx/access.log main;
|
108
|
+
|
109
|
+
sendfile on;
|
110
|
+
#tcp_nopush on;
|
111
|
+
|
112
|
+
keepalive_timeout 65;
|
113
|
+
|
114
|
+
#gzip on;
|
115
|
+
|
116
|
+
include /etc/nginx/conf.d/*.conf;
|
117
|
+
}
|
118
|
+
|
119
|
+
```
|
120
|
+
|
121
|
+
/etc/nginx/conf.d/default.conf
|
122
|
+
|
123
|
+
```config
|
124
|
+
server {
|
125
|
+
listen 80;
|
126
|
+
server_name localhost;
|
127
|
+
|
128
|
+
#charset koi8-r;
|
129
|
+
#access_log /var/log/nginx/host.access.log main;
|
130
|
+
|
131
|
+
location / {
|
132
|
+
root /usr/share/nginx/html;
|
133
|
+
index index.html index.htm;
|
134
|
+
}
|
135
|
+
|
136
|
+
#error_page 404 /404.html;
|
137
|
+
|
138
|
+
# redirect server error pages to the static page /50x.html
|
139
|
+
#
|
140
|
+
error_page 500 502 503 504 /50x.html;
|
141
|
+
location = /50x.html {
|
142
|
+
root /usr/share/nginx/html;
|
143
|
+
}
|
144
|
+
|
145
|
+
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
146
|
+
#
|
147
|
+
#location ~ \.php$ {
|
148
|
+
# proxy_pass http://127.0.0.1;
|
149
|
+
#}
|
150
|
+
|
151
|
+
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
152
|
+
#
|
153
|
+
#location ~ \.php$ {
|
154
|
+
# root html;
|
155
|
+
# fastcgi_pass 127.0.0.1:9000;
|
156
|
+
# fastcgi_index index.php;
|
157
|
+
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
|
158
|
+
# include fastcgi_params;
|
159
|
+
#}
|
160
|
+
|
161
|
+
# deny access to .htaccess files, if Apache's document root
|
162
|
+
# concurs with nginx's one
|
163
|
+
#
|
164
|
+
#location ~ /\.ht {
|
165
|
+
# deny all;
|
166
|
+
#}
|
167
|
+
}
|
168
|
+
|
169
|
+
```
|