Skip to content

Instantly share code, notes, and snippets.

Created June 22, 2015 20:26
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Example H2O HTTP server configuration for PHP rewrite apps (such as Bolt, WordPress)
# to find out the configuration commands, run: h2o --help
user: www-data
host: xx.xx.xx.xx
port: 443
certificate-file: /etc/nginx/ssl/ssl-bundle.crt
key-file: /etc/nginx/ssl/example_com.key
file.dir: /var/www/example_com # serve static files if found
file.dirlisting: on
redirect: # if not found, internally redirect to /index.php/<path>
url: /index.php/
internal: YES
status: 307
file.custom-handler: # handle PHP scripts using php-cgi (FastCGI mode)
extension: .php
port: /var/run/hhvm/hhvm.sock
type: unix
file.index: [ 'index.php', 'index.html' ]
access-log: /var/log/h2o/access-log
error-log: /var/log/h2o/error-log
pid-file: /var/run/h2o/pid
http2-reprioritize-blocking-assets: ON # performance tuning option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment