Skip to content

Nginx Settings

The Nginx tab in Application Settings controls how Appliku configures Nginx for your application. This includes deployment behavior, domain access rules, and the ability to provide a fully custom Nginx configuration.

Nginx settings tab showing checkboxes and the custom config editor

Save, Save and Apply, and Save and Deploy

The tab has three buttons:

  • Save stores the settings. It does not change nginx.
  • Save and Apply stores the settings and then writes the nginx configuration of this application for all its domains (the default subdomain and every custom domain) at once, with no build.
  • Save and Deploy stores the settings and then queues a deployment of the application.

The behaviour is the same for the default subdomain and for custom domains.

Save and Apply

Save and Apply is for applications on a standalone server with dockerized nginx, and for cluster applications. It does these steps:

  1. It makes the new nginx configuration of the application.
  2. It tests the full configuration with nginx -t before it changes a file on the server.
  3. It writes the files of this application, tests again in the running nginx and reloads nginx.
  4. If nginx refuses the new configuration, Appliku puts the old files back. Nothing changes. In the rare case that the old files cannot be put back, the result says "the restore failed". Then use Repair nginx on the server page (team owners and admins) or contact support.

Only the files of this application change. The files of the other applications on the same server keep their content.

The result shows under the buttons: what was changed, added or removed, and the nginx -t output when the test failed. When you open the tab again, it shows the last result (also of an automatic apply, see below) if it is less than 24 hours old.

Notes on Save and Apply:

  • Save and Apply does not get certificates. A domain that has no certificate yet keeps its current configuration, and the result lists it. A deployment gets the certificate and writes the configuration of that domain.
  • Save and Apply also writes the current container port and the static site setting of the application. If you changed them on another tab and did not deploy yet, deploy first.
  • If another nginx change runs on the same server (a deployment, a repair, a certificate renewal), Save and Apply waits for it, for up to about 10 minutes, and then continues. The result shows that it waits. If the other change takes longer, the result says that another nginx change runs; try again a few minutes later.
  • If nginx -t fails in a file of this application, fix the custom config and click Save and Apply again. If it fails in a file of another application or in a file that Appliku did not write, a team owner or admin can repair the server nginx configuration with Server > Nginx > Repair nginx.
  • If nginx does not run on the server, Appliku writes and tests the files but does not start nginx. nginx loads them when it starts.
  • Any team member who can change the application can use Save and Apply.

Save and Apply is disabled:

  • On a standalone server with host nginx. Use Save and Deploy. You can switch the server to dockerized nginx in the server settings.
  • On a standalone server when Update Nginx Configuration on Deploy is off.

Save and Deploy

  • It is a normal deployment, with a build. A deployment that runs already finishes first. A deployment that waits in the queue is replaced by the new one.
  • The nginx configuration is written at the start of the deployment, before the build. If the build fails later, the new nginx configuration stays in use.
  • The deployment writes the settings that are saved when its nginx step starts.
  • Under the buttons, View deployment opens the queued deployment.
  • If the deployment cannot start (for example, the server is not ready), the settings stay saved and a message tells you that the deployment did not start.
  • On a standalone server, Save and Deploy is disabled when Update Nginx Configuration on Deploy is off, because deployments do not update the nginx configuration of this application then.

Clusters

On a cluster, Save only stores the nginx settings. Before, a save wrote the change for the default subdomain at once, with no test, and custom domains got it only on the next deployment. Now use Save and Apply (all domains, tested) or Save and Deploy.

A change of the application name, the container port, the static site setting or the cluster of a cluster application (for example from appliku.yml or from the Build Settings tab) starts an automatic apply for all domains. The Nginx tab shows its result as the last apply.

Options

Update Nginx Configuration on Deploy

This option is available for applications on a standalone server. Cluster deployments always update the nginx configuration.

When enabled (the default), Appliku regenerates the Nginx configuration on every deployment. This keeps the config in sync with your application's current domain and process settings.

Disable this option if you are managing a custom Nginx configuration that should not be overwritten on each deploy. Note that when disabled, changes you make to domains or volumes in the dashboard will not be automatically reflected in the Nginx config — you will need to update it manually.

Disable Default Subdomain

By default, Appliku assigns each application a subdomain on your server's base domain (e.g., myapp.myserver.applikuapp.com). Enable this option to disable that default subdomain and serve the application only on explicitly attached custom domains.

Allow HTTP Access on All Attached Domains

By default, Appliku redirects HTTP traffic to HTTPS. Enable this option to allow plain HTTP access on all domains attached to the application. This is useful for applications that handle their own HTTP-to-HTTPS logic, or for internal services that do not require TLS.

HTTP Protocol

Selects the HTTP protocol Nginx advertises to clients at the edge. Available options:

  • HTTP/1.1 (default): no change in behavior. All vhosts speak HTTP/1.1 to clients.
  • HTTP/2: Nginx negotiates HTTP/2 with clients that support it, falling back to HTTP/1.1 otherwise. Browsers will use HTTP/2 automatically over ALPN; no client-side configuration is needed.

The selector is only available for applications whose vhost is served by dockerized Nginx, which means:

  • Cluster applications.
  • Standalone server applications whose server has dockerized Nginx enabled.

For applications running on a server with host (system) Nginx, an info notice appears in place of the selector. To enable the option, switch the server to dockerized Nginx in the server settings.

HTTP/2 is an edge-only setting. Traffic between Nginx and your application container always uses HTTP/1.1, regardless of the option you select here, so no application-side changes are required.

See Save, Save and Apply, and Save and Deploy for when a change takes effect.

Use Custom Nginx Configuration

Enables the custom Nginx configuration editor. When you first enable this option, the editor is pre-populated with the full Nginx configuration that Appliku currently generates for your application — including proxy pass settings, volume mounts, and domain configuration.

You can then modify the configuration to suit your needs. On Save, Appliku checks the syntax and refuses the directives that Appliku manages. See Save, Save and Apply, and Save and Deploy for when a change takes effect.

Warning

Once you enable Use Custom Nginx Configuration, new volumes you add to the application will not be automatically reflected in the Nginx config. You must update the configuration manually whenever you add or change volumes.

Custom Nginx Configuration Editor

When Use Custom Nginx Configuration is enabled, a code editor appears with your application's current generated Nginx configuration.

The configuration is divided into two kinds of sections:

  • Managed sections — marked with comments indicating they are auto-generated. These provide the baseline proxy pass, upstream definitions, and SSL handling.
  • Editable area — the section between the managed blocks where you can add your own directives.

Common Customizations

Increase upload size limit:

client_max_body_size 100M;

Increase proxy timeouts (for long-running requests):

proxy_read_timeout 300s;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;

Add custom headers:

add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;

Enable gzip compression:

gzip on;
gzip_types text/plain text/css application/json application/javascript;
gzip_min_length 1000;

After editing, click Save and Apply, Save and Deploy or Save. See Save, Save and Apply, and Save and Deploy for when a change takes effect.

Reverting to the Auto-Generated Configuration

To go back to the fully managed Nginx configuration:

  1. Disable Use Custom Nginx Configuration
  2. Re-enable Update Nginx Configuration on Deploy (if you had disabled it)
  3. Click Save and Apply (or Save and Deploy on a server with host nginx)

Appliku will regenerate the Nginx configuration from scratch based on your current application settings.