Created
May 7, 2016 22:22
-
-
Save nacika-ins/93c9884d7a13c98a0be16c5e3515fea0 to your computer and use it in GitHub Desktop.
h2o spa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to find out the configuration commands, run: h2o --help | |
# 最大コネクション数 | |
max-connections: 1024 | |
max-delegations: 100 | |
# スレッド数 | |
num-threads: 4 | |
# HTTP | |
listen: 8080 | |
# HTTPS | |
listen: | |
port: 8081 | |
ssl: | |
certificate-file: examples/h2o/server.crt | |
key-file: examples/h2o/server.key | |
hosts: | |
"127.0.0.1.xip.io:8080": | |
paths: | |
# 通常のルーティング | |
/: | |
file.dir: /www/html | |
mruby.handler: | | |
lambda do |env| | |
f = open("/www/html/index.html") | |
body = f.read | |
f.close | |
return [200, {"x-reproxy-url" => "/"}, [ body ]] | |
end | |
# staticファイル | |
/static/: | |
file.dir: /www/static | |
# APIアクセス | |
# TODO: grpc経由のアクセスにする | |
/_/: | |
proxy.reverse.url: http://web:8000/_/ | |
proxy.preserve-host: OFF | |
proxy.timeout.keepalive: 0 | |
proxy.timeout.io: 30000 | |
access-log: /dev/stdout | |
error-log: /dev/stderr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment