アクセス許可の設定の書き方が違うので注意
修正前(2.2など)
<Directory "/home/www">
Order allow,deny
Allow from all
</Directory>
修正後
<Directory "/home/www">
Require all granted
</Directory>
これでOK!
Nginx のリバースプロキシ環境において、フロントエンドの Nginx が 443 (HTTPS) でリクエストを受け付け、内部では 80 (HTTP) でラウンドロビン方式の負荷分散を行っている場合、Chrome で Mixed Content エラー が発生することがあります。
この問題を解決するために、wp-config.php
の冒頭に以下の設定を追加すると効果的です。
/** mixed content the page at ' url ' was loaded over https wordpress nginx */
/** プロキシ設定の場合、httpsでリダイレクトするように設定が必要! */
/** HTTP_X_FORWARDED_FOR の環境変数名はAWSなどお使いのサーバー環境により若干変更されている時があるので要確認すること */
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$_SERVER['HTTPS'] = 'on';
}
内部では 80 (HTTP)側の nginx.conf
ファイルを操作できる方は、以下の設定でも対応可能です。
どちらかお好みでOK
location ~ \.php$ {
include fastcgi_params;
# mixed content the page at ' url ' was loaded over https wordpress nginx
# プロキシ設定の場合、httpsでリダイレクトするように設定が必要!ここから
fastcgi_param HTTPS on;
fastcgi_param HTTP_X_FORWARDED_PROTO https;
# ここまで
fastcgi_intercept_errors on;
fastcgi_pass php-fpm;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
起動でこける
原因はgem
gem 'concurrent-ruby', '1.3.5'
Gemfileの末尾に追記して、しばらく固定にしておく
gem 'concurrent-ruby', '1.3.4'
追記したらインストール
bundle install
# Fetching concurrent-ruby 1.3.4 (was 1.3.5)
# Installing concurrent-ruby 1.3.4 (was 1.3.5)
以下ログ
# gem 'concurrent-ruby', '1.3.5' では以下エラーになるので'1.3.4'固定にしておく
#
# bundler: failed to load command: puma (/app-root/vendor/bundle/ruby/3.2.0/bin/puma)
# /app-root/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8.7/lib/active_support/logger_thread_safe_level.rb:12:in `<module:LoggerThreadSafeLevel>': uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)
#
# Logger::Severity.constants.each do |severity|
# ^^^^^^^^^^
Apache 2.4.39
[.htaccess] Or [httpd.conf]
# 0.0.0.0にアクセス許可のIPを設定する # AWS ELB 用 管理画面アクセス制御 <location "/wp-admin"> # 管理用IP SetEnvIf X-Forwarded-For "0.0.0.0.*" allowed_ip_admin SetEnvIf X-Forwarded-For "0.0.0.0.*" allowed_ip_admin Order Deny,Allow Deny from all Allow from env=allowed_ip_admin </location>
サービスの
サブスクリプションの利点を説明するテキストを追加します。