LoginSignup
5
0

More than 3 years have passed since last update.

Bitnamiでバーチャルホストの設定を読み込ませる

Posted at

Bitnamiに入れたWordpressのバーチャルホスト設定で手間取ったため手順をメモ

手順

1. Wordpressのconfigの設定

  • Wordpressのバーチャルホストのconfigは/opt/bitnami/apps/Wordpress/conf/httpd-vhosts.confに格納されている
  • ダミーで入っているデフォルトの中身を書き換える

2. Bitnami本体のconfigの設定

  • Wordpressのconfigを触るだけでは設定が反映されない。Bitnami本体にもconfigが存在するため、そこでWordpressのconfigを読み込ませる必要がある。なので下記の内容を追記する
    • ちなみにbitnami-apps-vhosts.confbitnami-apps-prefix.confなどとともに同じディレクトリのbitnami.confでさらに読み込まれている
/opt/bitnami/apache2/conf/bitnami/bitnami-apps-vhosts.conf
# Bitnami applications installed in a Virtual Host
Include '/opt/bitnami/apps/wordpress/conf/httpd-vhosts.conf'

3. Bitnamiのprefixの無効化

  • Include以下をコメントアウトする
/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf
# Bitnami applications installed in a prefix URL
# Include "/opt/bitnami/apps/wordpress/conf/httpd-prefix.conf"
# Include "/opt/bitnami/apps/phpmyadmin/conf/httpd-prefix.conf"

4. Apacheの再起動

再起動してエラーが出なければOK.

sudo /opt/bitnami/ctlscript.sh restart apache

Refference

5
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
5
0