Logo

Command Palette

Search for a command to run...

Nginx Configuration

Nginx

Nginx is the default webserver & reverse proxy for applications managed by Cloud 66.

The following settings are available via the Manifest file:

OptionApplied onDescriptionClouds
corsEnable Cross Origin Resource SharingAll
nginx/precompiled_urlA URL pointing to a file in tar.gz format that contains a custom version of Nginx that will be used with your application. This Nginx package MUST be compiled using our Cloud 66 compiler. Please read the docs on the Github page for more details.All
extra_build_arguments (deprecated)Extra build argument string that will be added to the nginx build command. If you require additional modules that themselves require specific source to be present, you should use a BEFORE_NGINX deploy hook to ensure that source is present. You can use the cloud66/download snippet to achieve this easily. The following build arguments are currently always added: --with-http_realip_module --with-ipv6 --with-http_v2_module regardless of this value.All
perfect_forward_secrecy (deprecated)Enable Perfect Forward SecrecyAll

Example YAML for Nginx

rails:
  configuration:
    nginx:
      extra_build_arguments: "--add-module=/path/to/module"
      perfect_forward_secrecy: true # deprecated

CORS configuration

If required, you can also specify the allowed origin (as '*' or a single origin) and methods. You can also specify a comma-separated list of origins, headers, and whether to allow credentials for CORS.

rails:
  configuration:
    nginx:
      cors:
        origin: '*'
        methods: 'GET, OPTIONS'
        headers: 'Custom-Header, Another-Header'
        credentials: true