Month: April 2018

  • Some simple rules for a modern web application install

    1. Do not keep configuration for different environments in code You can read it in via an external storage or configuration file that is set by environment variables in the local setup. For example, consider setting the configuration file path in your Nginx config for a fastcgi deployment, e.g.: [code] fastcgi_param MY_CONFIG /path/to/config-file.json [/code] And […]

  • Blanket rewrite to HTTPS (Nginx)

    This is simple — but I’ve seen it done in a few different ways. This is the shortest possible recipe: [code] server { listen 80 default_server; server_name _; return 301 https://$host$request_uri; } [/code] Ensure that you only listen for 443 ssl in other config files, e.g. [code] server { root /home/stephan/src/testsite/www; index index.html; server_name; […]