質問編集履歴

1

2020/08/25 14:21

投稿

jackhase
jackhase

スコア22

test CHANGED
@@ -1 +1 @@
1
- 本番環境アクセスできない。(Slimフレームワーク・Xreaサーバー)
1
+ XREAの無料サーバーにSlimアプリをデプロイしたい
test CHANGED
@@ -1,95 +1,7 @@
1
+ XREA FREEを利用して、SlimとMySQLで作成したアプリケーションをデプロイしたいのですが
2
+
1
- ### タイトル:本番環境へアクセスに失敗する
3
+ 過去文献などが見つからず、どうしていいのかわかりません。
2
4
 
3
5
 
4
6
 
5
- ### 実現したいこと
6
-
7
- Slimフレームワークを使用して、勤怠管理アプリケーションを作成しています。仮でURLルーティングだけ決めて、本番サーバーにデプロイしたのですがアクセスすると500エラーが返されてしまいます。このようなエラーはどういった場合に起こるのでしょうか。また確認すべき項目をご教授頂いてもよろしいでしょうか。
8
-
9
-
10
-
11
- ※おそらく問題の原因はこのあたりだと思うのですが、原因の特定に至っていません。
12
-
13
- ・htaccces
14
-
15
- ・ドキュメントルート
16
-
17
- ・トップページのURL
18
-
19
-
20
-
21
- ・CentOS上のフロントコントローラーのディレクトリ /home/vagrant/kinntaikannri/slim-app/public
22
-
23
- ・本番サーバーのフロントコントローラーのディレクトリ /virtual/h5eca/public_html/h5eca.shop/kinntai/public
24
-
25
- ・本番サーバーのドキュメントルート public_html/
26
-
27
- ・トップページのURL http://www.h5eca.shop/h5eca.shop/kinntai/board/dashboard(←これが間違っている?)
28
-
29
-
30
-
31
- ・以下.htacccess
32
-
33
- ```.htacccess
34
-
35
- <IfModule mod_rewrite.c>
36
-
37
- RewriteEngine On
38
-
39
-
40
-
41
- # Some hosts may require you to use the `RewriteBase` directive.
7
+ もし過去に同じレンタルサーバーを使ってSlimのアプリをデプロイしたことがある方がいらっしゃれば、ご教示いただきたく思います。
42
-
43
- # Determine the RewriteBase automatically and set it as environment variable.
44
-
45
- # If you are using Apache aliases to do mass virtual hosting or installed the
46
-
47
- # project in a subdirectory, the base path will be prepended to allow proper
48
-
49
- # resolution of the index.php file and to redirect to the correct URI. It will
50
-
51
- # work in environments without path prefix as well, providing a safe, one-size
52
-
53
- # fits all solution. But as you do not need it in this case, you can comment
54
-
55
- # the following 2 lines to eliminate the overhead.
56
-
57
- RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
58
-
59
- RewriteRule ^(.*) - [E=BASE:%1]
60
-
61
-
62
-
63
- # If the above doesn't work you might need to set the `RewriteBase` directive manually, it should be the
64
-
65
- # absolute physical path to the directory that contains this htaccess file.
66
-
67
- # RewriteBase /
68
-
69
-
70
-
71
- RewriteCond %{REQUEST_FILENAME} !-f
72
-
73
- RewriteRule ^ index.php [QSA,L]
74
-
75
- </IfModule>
76
-
77
-
78
-
79
- ```
80
-
81
-
82
-
83
- ### 環境
84
-
85
- PHP 7.2.28
86
-
87
- composer 1.10.1
88
-
89
- CentOS 6.10
90
-
91
- OpenSSL 1.01
92
-
93
-
94
-
95
- ### 参考にしたサイト