Skip to content

Instantly share code, notes, and snippets.

@watakirin
Last active April 19, 2016 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save watakirin/858185ac82f0b64e14f5 to your computer and use it in GitHub Desktop.
Save watakirin/858185ac82f0b64e14f5 to your computer and use it in GitHub Desktop.
H2O 1.7.0 Settings
user: www-data
listen: 80
listen:
port: 443
ssl:
key-file: /path/to/server.key
certificate-file: /path/to/server.crt
cipher-suite: AES128-SHA:ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:HIGH:MEDIUM:!aNULL:!MD5:!RC4
file.index: [ 'index.php', 'index.html' ]
file.custom-handler:
extension: .php
fastcgi.connect:
port: /path/to/php-fpm.sock
type: unix
access-log: "|/path/to/cronolog /path/to/access-log.%m%d"
error-log: "|/path/to/cronolog /path/to/error-log.%m%d"
pid-file: /path/to/h2o.pid
http2-reprioritize-blocking-assets: ON
file.send-gzip: ON
gzip: ON
expires: 30 day
# Version 1.5の時点でjsファイルにgzip圧縮がかからなかったので
# jsに対してis_compressibleオプションを付与した
file.mime.settypes:
"application/javascript":
extensions: [".js"]
is_compressible: yes
hosts:
"heartprotocol.com:80":
paths:
/:
file.dir: /path/to/heartprotocol.com
"blog.heartprotocol.com:80":
paths:
"/":
redirect:
url: https://blog.heartprotocol.com/
status: 301
"blog.heartprotocol.com:443":
paths:
"/":
file.dir: /path/to/blog.heartprotocol.com
redirect:
url: /index.php/
internal: YES
status: 307
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment