質問編集履歴

11

開発環境の追加

2019/11/06 10:37

投稿

ShunItsuki
ShunItsuki

スコア13

test CHANGED
File without changes
test CHANGED
@@ -406,6 +406,8 @@
406
406
 
407
407
  macos catalina/10.15
408
408
 
409
+ homebrew
410
+
409
411
  Wordpress/5.2.4
410
412
 
411
413
  PHP/7.3.10

10

パーミッションを記載

2019/11/06 10:37

投稿

ShunItsuki
ShunItsuki

スコア13

test CHANGED
File without changes
test CHANGED
@@ -286,7 +286,11 @@
286
286
 
287
287
 
288
288
 
289
- ### usr/local/etc/php/7.3/php-fpm.d/www.conf
289
+ ### usr/local/etc/php/7.3/php-fpm.d/www.conf
290
+
291
+ (php-fpm.confのパーミッション644)
292
+
293
+ (www.confのパーミッション755に変更)
290
294
 
291
295
  ```
292
296
 

9

設定ファイル・試したことの追記

2019/11/06 08:59

投稿

ShunItsuki
ShunItsuki

スコア13

test CHANGED
File without changes
test CHANGED
@@ -26,7 +26,7 @@
26
26
 
27
27
 
28
28
 
29
- ### nginx.conf
29
+ ### usr/local/etc/nginx/nginx.conf
30
30
 
31
31
 
32
32
 
@@ -286,6 +286,50 @@
286
286
 
287
287
 
288
288
 
289
+ ### usr/local/etc/php/7.3/php-fpm.d/www.conf
290
+
291
+ ```
292
+
293
+ [www]
294
+
295
+
296
+
297
+ user = nginx
298
+
299
+ group = nginx
300
+
301
+
302
+
303
+ listen = 127.0.0.1:9000
304
+
305
+
306
+
307
+ listen.owner = nginx
308
+
309
+ listen.group = nginx
310
+
311
+ listen.mode = 0660
312
+
313
+
314
+
315
+ pm = dynamic
316
+
317
+
318
+
319
+ pm.max_children = 5
320
+
321
+ pm.start_servers = 2
322
+
323
+ pm.min_spare_servers = 1
324
+
325
+ pm.max_spare_servers = 3
326
+
327
+
328
+
329
+ ```
330
+
331
+
332
+
289
333
  ### 試したこと
290
334
 
291
335
 
@@ -318,7 +362,9 @@
318
362
 
319
363
 
320
364
 
365
+
366
+
321
- 下記エラー追記Fastcgiが機能していないのが原因かもしれない。
367
+ 下記エラー追記 : Fastcgiが機能していないのが原因かもしれない。
322
368
 
323
369
  ```
324
370
 
@@ -340,9 +386,11 @@
340
386
 
341
387
  数字ベースにすると404エラーとなっている。
342
388
 
343
- ```
344
-
345
- "GET /wordpress/archives/334 HTTP/1.1" 404 27 "http://localhost/wordpress/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36"
389
+ usr/local/var/log/nginx/error.log
390
+
391
+ ```
392
+
393
+ 2019/11/06 17:37:03 [error] 27841#0: *7911 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /wordpress/archives/623 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost", referrer: "http://localhost/wordpress/"
346
394
 
347
395
  ```
348
396
 

8

試したことの追加

2019/11/06 08:52

投稿

ShunItsuki
ShunItsuki

スコア13

test CHANGED
File without changes
test CHANGED
@@ -338,6 +338,16 @@
338
338
 
339
339
  ```
340
340
 
341
+ 数字ベースにすると404エラーとなっている。
342
+
343
+ ```
344
+
345
+ "GET /wordpress/archives/334 HTTP/1.1" 404 27 "http://localhost/wordpress/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36"
346
+
347
+ ```
348
+
349
+
350
+
341
351
  ### 開発環境
342
352
 
343
353
 

7

試したことの追記

2019/11/06 08:21

投稿

ShunItsuki
ShunItsuki

スコア13

test CHANGED
File without changes
test CHANGED
@@ -294,7 +294,7 @@
294
294
 
295
295
  パーマリンクの設定変更→保存
296
296
 
297
- パーマリンクは投稿名です。
297
+ パーマリンクは数字ベースです。
298
298
 
299
299
  ```
300
300
 
@@ -316,21 +316,7 @@
316
316
 
317
317
  ```
318
318
 
319
- アクセスへのリンクを押下すると下記のエラーをはく。
319
+
320
-
321
- ```
322
-
323
- GET /wordpress/%e8%87%aa%e5%8b%95%e4%b8%8b%e6%9b%b8%e3%81%8d
324
-
325
- →暗号化されているのかな??
326
-
327
- テーマにはjevelinを使用しています。
328
-
329
- →https://noronoron.com/alphanumerical-slug/が原因かと思われます。
330
-
331
- 日本語でリンクを作るとエンコードしてしまい、うまくいかない。
332
-
333
- ```
334
320
 
335
321
  下記エラー追記Fastcgiが機能していないのが原因かもしれない。
336
322
 

6

試したことの追記

2019/11/06 08:18

投稿

ShunItsuki
ShunItsuki

スコア13

test CHANGED
File without changes
test CHANGED
@@ -332,6 +332,26 @@
332
332
 
333
333
  ```
334
334
 
335
+ 下記エラー追記Fastcgiが機能していないのが原因かもしれない。
336
+
337
+ ```
338
+
339
+ FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream
340
+
341
+
342
+
343
+ ps auxすると下記となる。 --nodaemonizeなのが原因なのか?
344
+
345
+ username 27243 0.0 0.0 4535556 952 ?? S 3:42PM 0:00.45 /usr/local/opt/php/sbin/php-fpm --nodaemonize
346
+
347
+ username 27242 0.0 0.0 4513156 972 ?? S 3:42PM 0:00.96 /usr/local/opt/php/sbin/php-fpm --nodaemonize
348
+
349
+ username 27241 0.0 0.0 4497836 3200 ?? S 3:42PM 0:00.19 /usr/local/opt/php/sbin/php-fpm --nodaemonize
350
+
351
+
352
+
353
+ ```
354
+
335
355
  ### 開発環境
336
356
 
337
357
 

5

試したことの追加

2019/11/06 07:57

投稿

ShunItsuki
ShunItsuki

スコア13

test CHANGED
File without changes
test CHANGED
@@ -326,6 +326,10 @@
326
326
 
327
327
  テーマにはjevelinを使用しています。
328
328
 
329
+ →https://noronoron.com/alphanumerical-slug/が原因かと思われます。
330
+
331
+ 日本語でリンクを作るとエンコードしてしまい、うまくいかない。
332
+
329
333
  ```
330
334
 
331
335
  ### 開発環境

4

試したことの追加

2019/11/05 10:37

投稿

ShunItsuki
ShunItsuki

スコア13

test CHANGED
File without changes
test CHANGED
@@ -316,7 +316,17 @@
316
316
 
317
317
  ```
318
318
 
319
-
319
+ アクセスへのリンクを押下すると下記のエラーをはく。
320
+
321
+ ```
322
+
323
+ GET /wordpress/%e8%87%aa%e5%8b%95%e4%b8%8b%e6%9b%b8%e3%81%8d
324
+
325
+ →暗号化されているのかな??
326
+
327
+ テーマにはjevelinを使用しています。
328
+
329
+ ```
320
330
 
321
331
  ### 開発環境
322
332
 

3

試した結果を追記

2019/11/05 05:20

投稿

ShunItsuki
ShunItsuki

スコア13

test CHANGED
File without changes
test CHANGED
@@ -312,6 +312,8 @@
312
312
 
313
313
  }
314
314
 
315
+ →file not foundとなる・・・
316
+
315
317
  ```
316
318
 
317
319
 

2

try_fileディレクティブを記載

2019/11/05 04:16

投稿

ShunItsuki
ShunItsuki

スコア13

test CHANGED
File without changes
test CHANGED
@@ -296,6 +296,24 @@
296
296
 
297
297
  パーマリンクは投稿名です。
298
298
 
299
+ ```
300
+
301
+ 下記のlocation内にtry_files ディレクティブを記載
302
+
303
+ location / {
304
+
305
+ root /Users/username/works/www;
306
+
307
+ index index.html index.htm index.php;
308
+
309
+ #パーマリンクのため
310
+
311
+ try_files $uri $uri/ index.php?q=$uri;
312
+
313
+ }
314
+
315
+ ```
316
+
299
317
 
300
318
 
301
319
  ### 開発環境

1

試したことの追加

2019/11/05 04:15

投稿

ShunItsuki
ShunItsuki

スコア13

test CHANGED
File without changes
test CHANGED
@@ -294,6 +294,8 @@
294
294
 
295
295
  パーマリンクの設定変更→保存
296
296
 
297
+ パーマリンクは投稿名です。
298
+
297
299
 
298
300
 
299
301
  ### 開発環境