Actions
Maintaining static websites on staticweb » History » Revision 6
« Previous |
Revision 6/8
(diff)
| Next »
Ahmed Bilal, 04/30/2020 08:13 AM
Maintaining static websites on staticweb¶
Work In Progress¶
1. Add DNS Entry under dot-cdist/files/dns/zones/ungleich.ch
staticcms-staging CNAME staticweb
2. Run the following command on control server.
cd ~/.cdist; git pull; cdist config -bj7 -p9 -vv d{1..7}.ungleich.ch
3. Run the following commands on staticweb.ungleich.ch
mkdir -p /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/www/u/
chown -R ungleichstatic /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/www/
4. Create nginx config for the site under /etc/nginx/sites-enabled/staticcms-staging.ungleich.ch
server {
listen *:80;
listen [::]:80;
server_name staticcms-staging.ungleich.ch;
root /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/www;
# we can use root ... outside of the 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;
}
}
Updated by Ahmed Bilal over 4 years ago · 6 revisions