質問編集履歴

2

default.conf

2021/12/16 07:24

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -18,6 +18,8 @@
18
18
 
19
19
  │ └Dockerfile
20
20
 
21
+ │ └default.conf
22
+
21
23
  ├mysql
22
24
 
23
25
  │ └Dockerfile
@@ -142,6 +144,88 @@
142
144
 
143
145
 
144
146
 
147
+ ## nginx/default.conf
148
+
149
+
150
+
151
+ ```
152
+
153
+ server {
154
+
155
+ listen 80;
156
+
157
+
158
+
159
+ root /var/www/html/public;
160
+
161
+
162
+
163
+ access_log /var/log/nginx/access.log;
164
+
165
+ error_log /var/log/nginx/error.log;
166
+
167
+
168
+
169
+ add_header X-Frame-Options "SAMEORIGIN";
170
+
171
+ add_header X-XSS-Protection "1; mode=block";
172
+
173
+ add_header X-Content-Type-Options "nosniff";
174
+
175
+
176
+
177
+ index index.php index.html index.htm;
178
+
179
+
180
+
181
+ charset utf-8;
182
+
183
+
184
+
185
+ location / {
186
+
187
+ try_files $uri $uri/ /index.php?$query_string;
188
+
189
+ }
190
+
191
+
192
+
193
+ location = /favicon.ico { access_log off; log_not_found off; }
194
+
195
+ location = /robots.txt { access_log off; log_not_found off; }
196
+
197
+
198
+
199
+ error_page 404 /index.php;
200
+
201
+
202
+
203
+ location ~ .php$ {
204
+
205
+ fastcgi_pass app:9000;
206
+
207
+ fastcgi_index index.php;
208
+
209
+ fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
210
+
211
+ include fastcgi_params;
212
+
213
+ }
214
+
215
+
216
+
217
+ location ~ /.(?!well-known).* {
218
+
219
+ deny all;
220
+
221
+ }
222
+
223
+ }
224
+
225
+ ```
226
+
227
+
228
+
145
229
  ### 参考サイト
146
230
 
147
231
  https://yutaro-blog.net/2021/04/28/docker-laravel-vuejs-1/

1

title

2021/12/16 07:24

投稿

退会済みユーザー
test CHANGED
@@ -1 +1 @@
1
- Dockerを使った環境構築
1
+ Dockerを使ったLEMP環境構築
test CHANGED
File without changes