Skip to content

HTML stack documentation

Deployment

CI/CD

CI/CD tutorial

For a detailed instructions of setting up CI/CD workflow see the main deployment article

The following services are CI services that will be built by default:

  • HTTP server: nginx or apache

Containers

Nginx

Nginx can be configured with the following environment variables

Restarting nginx as default user:

sudo nginx -s reload

Do not gzip pages in your application

We already gzip content on Nginx side and it works faster. Having double gzip may cause issues.

Modules

Installed nginx modules.

PageSpeed

Nginx comes with mod_pagespeed which is disabled by default. To enable it add NGINX_PAGESPEED_ENABLED=1 environment variable to Nginx service. For more details see https://github.com/wodby/pagespeed.

ModSecurity + OWASP

Nginx comes with ModSecurity which is disabled by default. To enable it add NGINX_MODSECURITY_ENABLED=1 environment variable to Nginx service. For more details see https://github.com/wodby/modsecurity.

Custom config

If a config preset and available environment variables are not enough for your customizations you can use your own virtual host config:

  1. Copy /etc/nginx/conf.d/vhost.conf to your codebase, adjust to your needs
  2. Deploy code with your config file
  3. Add new environment variable NGINX_CONF_INCLUDE for nginx service, the value should the path to your *.conf file (e.g. /var/www/html/vhost.conf). The specified file will be included in /etc/nginx/nginx.conf

Apache

Restarting apache as default user:

sudo httpd -k restart

See details about virtual host preset.

Changelog

This changelog is for HTML stack on Wodby, to see images changes see tags description on repository page: nginx and Apache.

0.2.9

0.2.8

Update instructions:

  • If you used Nginx pagespeed module, add $NGINX_PAGESPEED_ENABLED=1, if you had $NGINX_PAGESPEED=on you can delete it since it's on by default

0.2.7

  • Nginx:
    • Patch updates: 1.15.6, 1.14.1
    • Nginx now uses real IP set from Edge

0.2.6

  • Nginx:
    • Always try index file for / location before 404
    • Remove outdated *.htm from the default index file
    • Bugfix: txt was missing from the default list of static extensions

0.2.5

0.2.4

  • Apache:
    • Patch update: 2.4.35
    • Option Indexes now disabled by default, can be enabled via $APACHE_INDEXES_ENABLED
  • Nginx patch update: 1.15.4

0.2.3

Nginx: $NGINX_ERROR_PAGE_40x replaced to $NGINX_ERROR_40x_URI

0.2.2

  • Nginx no longer hides 50x errors by default, can be enabled via $NGINX_HIDE_50x_ERRORS
  • Bugfix: env vars $NGINX_ERROR_PAGE_* had no effect
  • Setting $NGINX_VHOST_PRESET to empty value now disables usage of any presets
  • New $NGINX_VHOST_NO_DEFAULTS to disable default rules for virtual host
  • New default 50x error page, new $NGINX_ERROR_MESSAGE_50x to add a message on this page

0.2.1

Do not add trailing slashes for non-directory requests

0.2.0

  • Nginx:
    • Nginx patch update: 1.15.3
    • Bugfix: default 404 page did not work in Nginx
    • 403/404 pages now can be customized
    • Nginx image rebased to Alpine Linux 3.8
    • Extended list of static files extensions
    • $NGINX_STATIC_ that controls settings for handling static content
    • $NGINX_ALLOW_ACCESS_HIDDEN_FILES to control access to files starting with a dot
    • Added pseudo-streaming server-side for .flv files
    • Added pseudo-streaming server-side for .mp4, .mov, .m4a files. See env vars $NGINX_STATIC_MP4_* for configuration
    • Added .well-known location by default
    • Updated default values for open_file_cache settings
    • Default expires for static content set to 7d by default
    • Use $NGINX_LOG_FORMAT_OVERRIDE log format over $NGINX_LOG_FORMAT_SHOW_REAL_IP Apache:
    • MPM modules are now shared and can be configured (event is still the default)

0.1.0

Initial release