teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

http://localhost:8080/welcome の間違い

2019/03/30 10:28

投稿

katsun0921
katsun0921

スコア32

title CHANGED
File without changes
body CHANGED
@@ -112,7 +112,7 @@
112
112
 
113
113
  ```
114
114
 
115
- これだと```http://localhost:8080/```だとページが表示されますが、```http://localhost:8080//welcome```だと404 Not Foundとなってしまいました。
115
+ これだと```http://localhost:8080/```だとページが表示されますが、```http://localhost:8080/welcome```だと404 Not Foundとなってしまいました。
116
116
 
117
117
  この場合どこを疑えばよろしいのでしょうか?ルートはとおっていると思うのです。
118
118
 

1

nginxの設定を追記しました。

2019/03/30 10:28

投稿

katsun0921
katsun0921

スコア32

title CHANGED
File without changes
body CHANGED
@@ -59,6 +59,31 @@
59
59
 
60
60
  ```
61
61
 
62
+ nginxの設定
63
+ ```default.conf
64
+ server {
65
+ listen 80;
66
+ index index.php index.html;
67
+ root /var/www/public;
68
+
69
+ location / {
70
+ root /var/www/public;
71
+ index index.html index.php;
72
+ }
73
+
74
+ location ~ .php$ {
75
+
76
+ try_files $uri =404;
77
+ fastcgi_split_path_info ^(.+.php)(/.+)$;
78
+ fastcgi_pass php:9000;
79
+ fastcgi_index index.php;
80
+ include fastcgi_params;
81
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
82
+ fastcgi_param PATH_INFO $fastcgi_path_info;
83
+ }
84
+ }
85
+ ```
86
+
62
87
  ![larabel](665f61d205c1bc6e0c2d11e6ed0ae2a2.png)
63
88
 
64
89
  このあとroutesの処理を加えたところでつまりました。