Maintaining static websites on staticweb » History » Revision 6
Revision 5 (Ahmed Bilal, 04/30/2020 08:03 AM) → Revision 6/8 (Ahmed Bilal, 04/30/2020 08:13 AM)
h1. Maintaining static websites on staticweb h2. Work In Progress 1. Add DNS Entry under *dot-cdist/files/dns/zones/ungleich.ch* <pre> staticcms-staging CNAME staticweb </pre> 2. Run the following command on control server. <pre><code class="shell">cd ~/.cdist; git pull; cdist config -bj7 -p9 -vv d{1..7}.ungleich.ch</code></pre> 3. Run the following commands on staticweb.ungleich.ch <pre><code class="shell"> mkdir -p /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/www/u/ chown -R ungleichstatic /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/www/ </code></pre> 4. Create nginx config for the site under **/etc/nginx/sites-enabled/staticcms-staging.ungleich.ch** <pre><code> <pre><code># # Manually created # server { # Only bind on the reserved IP address(es) listen *:80; [::]:443; listen [::]:80; *:443; ssl on; ssl_certificate /etc/letsencrypt/live/staticcms-staging.ungleich.ch/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/staticcms-staging.ungleich.ch/privkey.pem; server_name staticcms-staging.ungleich.ch; root /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/www; # we can use root ... outside of the index index.html index.htm; location block to keep it generic # HOWEVER we don't want this, as http only serves the path that is necessary for letsencrypt, nothing more # Ask Nico, if you don't believe this -- 20190421 location /.well-known/acme-challenge/ / { root /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/www; } # Everything else -> ssl location / { return 301 https://$host$request_uri; } access_log /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/logs/access.log; } </code></pre>