Skip to content

Instantly share code, notes, and snippets.

@castaneai
Created September 16, 2015 10:46
Show Gist options
  • Select an option

  • Save castaneai/764b304cb3c2abc162d4 to your computer and use it in GitHub Desktop.

Select an option

Save castaneai/764b304cb3c2abc162d4 to your computer and use it in GitHub Desktop.
h2o -> php link on docker
#!/bin/sh
cat << DOB > /etc/h2o.conf
listen:
port: 80
file.custom-handler:
extension: .php
fastcgi.connect:
host: $PHP_PORT_9000_TCP_ADDR
port: $PHP_PORT_9000_TCP_PORT
type: tcp
hosts:
"*:80":
paths:
/:
file.dir: /var/www/html
DOB
h2o -c /etc/h2o.conf
FROM vimagick/h2o
COPY docker-entrypoint.sh /entrypoint.sh
RUN chmod a+x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment