3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

nginxにEC-CUBE3を入れてインストーラ(install.php)が動かない場合にやったこと

Posted at

現象

EC-CUBE3をnginxの管理下に展開してインストーラ(install.php)を呼び出すと、リダイレクトを繰り返したとかでブラウザエラーになって先に進まない。

原因

インストーラのURLが「/install.php/step1」とかいうキモいURLになってるためで、nginxの該当ドメインのconfで

 location / {
        try_files $uri $uri/ /index.php?$query_string;
 }

などと、PHP製webアプリにありがちなrewrite処理を書いてると、インストーラの呼び出しがindex.phpに飛ばされて動かない。

対策

とりあえずtry_filesの前にこう書いて回避。終わったら消す。

 location / {
        rewrite ^/install.php/(.*)$ /install.php?$1 last;
        try_files $uri $uri/ /index.php?$query_string;
 }
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?