Sign inSign up

dit4c/nghttpx

By dit4c

•Updated almost 9 years ago

nghttpx (HTTP/2 reverse proxy) on Alpine Edge

Image
0

10K+

dit4c/nghttpx repository overview

⁠dit4c/nghttpx

Very simple nghttpx⁠ image.

Python and CA certificates are included for OCSP support.

⁠Example Usage

Reverse-proxy http://mirror.aarnet.edu.au/⁠ on port 81 (h2c):

docker run -i --rm -p 81:3000 dit4c/nghttpx \
  --frontend-no-tls \
  --host-rewrite \
  -b mirror.aarnet.edu.au,80

Reverse-proxy http://mirror.aarnet.edu.au/⁠ on port 443 using self-signed certs:

# Create self-signed certs (elliptic curve)
openssl ecparam -genkey -name prime256v1 -out server.key
openssl req -new -key server.key -out server.csr
openssl req -x509 -days 365 -key server.key -in server.csr -out server.crt
# Run nghttpx
docker run -i --rm -p 443:3000 \
  -v `pwd`:/data:ro \
  dit4c/nghttpx \
  --host-rewrite \
  -b mirror.aarnet.edu.au,80 \
  /data/server.key /data/server.crt

Reverse-proxy container myappserver with exposed port 8080 on port 443 using self-signed certs:

# (Self-signed certs, as above)
# Run nghttpx in background
docker run -d --name myappserver-reverse-proxy \
  -p 443:3000 \
  --link myappserver:backend \
  -v `pwd`:/data:ro \
  dit4c/nghttpx \
  -b backend,8080 \
  /data/server.key /data/server.crt

Check it works using nghttp:

# (Self-signed certs, as above)
# Run nghttpx in background
docker run -ti --rm \
  --link myappserver-reverse-proxy:target \
  --entrypoint /usr/bin/nghttp \
  dit4c/nghttpx \
  -v https://target:3000/

Tag summary

Content type

Image

Digest

sha256:170c5e26d…

Size

15.8 MB

Last updated

almost 9 years ago

docker pull dit4c/nghttpx