H2OでのWordPress設定

LINEで送る
Pocket

  • h2o.conf
user: nobody
pid-file: /var/run/h2o/h2o.pid

num-threads: 2
num-name-resolution-threads: 1
max-connections: 10000
gzip: ON

file.custom-handler:
  extension: .php
  fastcgi.connect:
    port: /var/run/php-fpm/php7.2-fpm.sock
    type: unix

file.index: [ 'index.html', 'index.php' ]

hosts:
  <<: !file /etc/h2o/conf.d/hoge.jp.conf

error-log: /var/log/h2o/all-virtual.error.log
  • hoge.jp.conf
"hoge.jp:80":
  listen:
    port: 80
  paths:
    "/":
      redirect: https://hoge.jp

"hoge.jp:443":
  listen:
    port: 443
    ssl:
      certificate-file: /etc/letsencrypt/live/hoge.jp/fullchain.pem
      key-file: /etc/letsencrypt/live/hoge.jp/privkey.pem
  paths:
    "/":
      file.dir: /var/www/hoge.jp
      redirect:
        url: /index.php/
        internal: YES
        status: 307
  access-log: /var/log/h2o/hoge.jp.access.log

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *