You can enable HTTPS and HTTP2 support by adding ssl
section into http
config.
http:
# http host to listen.
address: 0.0.0.0:8080
# override http error code for the application errors (default 500)
appErrorCode: 505
# override http error code for the internal RR errors (default 500)
internalErrorCode: 505
# HTTP service provides HTTP2 transport
http2:
# enable HTTP/2, only with TSL, enabled by default
enabled: true
# max transfer channels, default 128
maxConcurrentStreams: 128
ssl:
# force redirect to https connection
redirect: true
# custom https port (default 443)
port: 443
# ssl cert
cert: server.crt
# ssl private key
key: server.key
# rootCA certificate path
rootCa: root.crt
To enable automatic redirect from http://
to https://
set redirect
option to true
(disabled by default).
RoadRunner support (HTTP/2 push)[https://en.wikipedia.org/wiki/HTTP/2_Server_Push] via virtual headers provided by PHP response.
return $response->withAddedHeader('http2-push', '/test.js');
Note that the path of the resource must be related to the public application directory and must include /
at the
beginning.
Please note, HTTP2 push only works under HTTPS with
static
service enabled.
You can enable HTTP/2 support over non-ecrypted TCP connection using H2C:
http:
http2.h2c: true
There is FastCGI frontend support inside the HTTP module, you can enable it (disabled by default):
http:
# HTTP service provides FastCGI as frontend
fcgi:
# FastCGI connection DSN. Supported TCP and Unix sockets.
address: tcp://0.0.0.0:6920
RootCA supported by the option in .rr.yaml
http:
# rootCA certificate path
rootCa: root.crt