Skip to content

nginx job from nginx/1.12.2

Github source: f49e49c or master branch

Properties

nginx_conf

The contents of nginx.conf, the primary configuration file

pre_start

The contents of the pre-start script. This can be used to populate the nginx server’s document_root, e.g. #!/bin/bash -ex NGINX_DIR=/var/vcap/store/nginx if [ ! -d $NGINX_DIR ]; then mkdir -p $(basename $NGINX_DIR) cd $(basename $NGINX_DIR) curl -L https://github.com/cunnie/sslip.io/archive/v1.tar.gz | tar xzf - mv sslip.io-1 $NGINX_DIR chown -R vcap:vcap $NGINX_DIR fi

Default
'#!/bin/bash'

ssl_chained_cert

This is the chained SSL certificate for the website; This is in PEM format. The topmost certificate should be the certificate for the website itself. (e.g. in the case of sslip.io, the certificate for sslip.io). The second-from-top certificate should be the intermediate certificate (e.g. “COMODO RSA Domain Validation Secure Server CA”). If there is another intermediate certificate, that should follow (e.g. “COMODO RSA Certification Authority”). There is no reason to include the root certificate, but there is no harm in including it either. It should be the last certificate (bottom-most).

Default
""

ssl_key

The SSL key; can be empty; should be in PEM format

Default
""

Templates

Templates are rendered and placed onto corresponding instances during the deployment process. This job's templates will be placed into /var/vcap/jobs/nginx/ directory (learn more).

  • bin/ctl (from ctl.sh)
  • bin/pre-start (from pre-start.erb)
  • etc/nginx.conf (from nginx.conf.erb)
  • etc/ssl.key.pem (from ssl_key.erb)
  • etc/ssl_chained.crt.pem (from ssl_chained_cert.erb)

Packages

Packages are compiled and placed onto corresponding instances during the deployment process. Packages will be placed into /var/vcap/packages/ directory.