Project

General

Profile

Maintaining static websites on staticweb » History » Revision 4

Revision 3 (Ahmed Bilal, 04/29/2020 09:32 AM) → Revision 4/8 (Ahmed Bilal, 04/29/2020 09:33 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 command on staticweb.ungleich.ch 
 <pre><code class="shell">mkdir -p /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/www/u/</code></pre> 
 4. Create nginx config for the site under **/etc/nginx/sites-enabled/staticcms-staging.ungleich.ch** 
 <pre><code># 
 # Manually created              
 # 
 server { 
     # Only bind on the reserved IP address(es) 

     listen [::]:443; 
     listen *: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; 

     index index.html index.htm; 
         location / { 
             root /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/www; 
         } 
     access_log /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/logs/access.log; 

 } 
 </code></pre>