質問編集履歴
2
nginxのエラーログ追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -109,7 +109,13 @@
|
|
109
109
|
|
110
110
|
にアクセスすると、`File not found.`と表示されます。
|
111
111
|
|
112
|
+
※nginxのエラーログ追記
|
113
|
+
```Bash
|
114
|
+
[error] 25420#25420: *2886487 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: ***.***.***.***, server: sample.com, request: "GET /payment/eccube_install.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "sample.com"
|
112
115
|
|
116
|
+
[error] 25420#25420: *2886506 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: ***.***.***.***, server: sample.com, request: "GET /payment/html/install.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "sample.com"
|
117
|
+
```
|
118
|
+
|
113
119
|
3 nginxの設定ファイルの`location /`の前に以下を追加した場合
|
114
120
|
|
115
121
|
```Bash
|
1
こちらで試してみた内容の追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -65,7 +65,97 @@
|
|
65
65
|
この設定ファイルに対して、`location /payment`に対する設定を追加すればよいかと思いますが、
|
66
66
|
どのように記述すればEC CUBE3を動かせるようになるか、ご教授いただけると幸いです。
|
67
67
|
|
68
|
+
----------------------------------------------------
|
68
69
|
|
70
|
+
当方にて試してみた内容を以下に追記させていただきます。
|
71
|
+
|
72
|
+
1 nginxの設定ファイルを変更しない場合
|
73
|
+
|
74
|
+
1.1
|
75
|
+
http://sample.com/payment/
|
76
|
+
|
77
|
+
にアクセスすると、cakePHP2のアプリのデフォルトのURLにリダイレクトされます。
|
78
|
+
|
79
|
+
http://sample.com/
|
80
|
+
|
81
|
+
|
82
|
+
1.2
|
83
|
+
http://sample.com/payment/eccube_install.php
|
84
|
+
http://sample.com/payment/html/install.php
|
85
|
+
|
86
|
+
にアクセスすると、`File not found.`と表示されます。
|
87
|
+
|
88
|
+
|
89
|
+
2 nginxの設定ファイルの`set $root_path`の前に以下を追加した場合
|
90
|
+
|
91
|
+
```Bash
|
92
|
+
location /payment {
|
93
|
+
set $root_path '/var/www/html/payment/html';
|
94
|
+
try_files $uri $uri/ /index.php$uri;
|
95
|
+
}
|
96
|
+
```
|
97
|
+
|
98
|
+
2.1
|
99
|
+
http://sample.com/payment/
|
100
|
+
|
101
|
+
にアクセスすると、cakePHP2のアプリのデフォルトのURLにリダイレクトされます。
|
102
|
+
|
103
|
+
http://sample.com/
|
104
|
+
|
105
|
+
|
106
|
+
2.2
|
107
|
+
http://sample.com/payment/eccube_install.php
|
108
|
+
http://sample.com/payment/html/install.php
|
109
|
+
|
110
|
+
にアクセスすると、`File not found.`と表示されます。
|
111
|
+
|
112
|
+
|
113
|
+
3 nginxの設定ファイルの`location /`の前に以下を追加した場合
|
114
|
+
|
115
|
+
```Bash
|
116
|
+
location /payment {
|
117
|
+
try_files $uri /index.php$is_args$args;
|
118
|
+
}
|
119
|
+
|
120
|
+
location ~ /payment/install/(.*).php/.+$ {
|
121
|
+
fastcgi_pass 127.0.0.1:9000;
|
122
|
+
fastcgi_index index.php;
|
123
|
+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
124
|
+
fastcgi_param PATH_INFO $fastcgi_script_name;
|
125
|
+
include fastcgi_params;
|
126
|
+
try_files $uri $uri/ /install.php;
|
127
|
+
|
128
|
+
}
|
129
|
+
|
130
|
+
location ~ /payment/(.*).php {
|
131
|
+
fastcgi_pass 127.0.0.1:9000;
|
132
|
+
fastcgi_index index.php;
|
133
|
+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
134
|
+
fastcgi_param PATH_INFO $fastcgi_script_name;
|
135
|
+
include fastcgi_params;
|
136
|
+
try_files $uri =404;
|
137
|
+
}
|
138
|
+
```
|
139
|
+
|
140
|
+
3.1
|
141
|
+
http://sample.com/payment/
|
142
|
+
|
143
|
+
にアクセスすると、cakePHP2のアプリのデフォルトのURLにリダイレクトされます。
|
144
|
+
|
145
|
+
http://sample.com/
|
146
|
+
|
147
|
+
|
148
|
+
3.2
|
149
|
+
http://sample.com/payment/eccube_install.php
|
150
|
+
http://sample.com/payment/html/install.php
|
151
|
+
|
152
|
+
にアクセスすると、`404 Not Found`と表示されます。
|
153
|
+
|
154
|
+
|
155
|
+
なお、`/payment`の箇所を`^/payment`に変更しても同じでした。
|
156
|
+
|
157
|
+
----------------------------------------------------
|
158
|
+
|
69
159
|
なお、サーバ環境などは以下になります。
|
70
160
|
|
71
161
|
CentOS 6.7
|