LoginSignup
0
0

More than 5 years have passed since last update.

eccube4を下層ディレクトリへリバースプロキシ(nginx対応)

Posted at

はじめに

表題の件での対応メモです。

やりたいこと

(1)webサイト(wordpress) : https://hoge.com
(2)ecサイト(eccube4) : https://shop.hoge.com

リバースプロキシで別サーバにあるecサイトを本家サイトのサブフォルダ配下にあるように見せたい。
https://hoge.com/shop -> reserve proxy - > https://shop.hoge.com

eccube4を下層ディレクトリへリバースプロキシの続き。
以前はapacheだったのですが、nginx対応版です。

設定(1) - webサイト側

フォルダ権限を直したくないのとapacheに戻すことも考慮。

/etc/nginx/nginx.conf
user=apache

問題点

(1)リバースプロキシが動作しない!

→ログを確認すると、ecサイト側へはipで接続している様子。バーチャルホストで設定していたので、ipでも参照できるようにapacheの設定を修正

(2)画像などのファイルが読み込めない

→ログを確認すると、テンポラリフォルダの権限の問題

#chown apache.apache -R /var/lib/nginx
0
0
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
0
0