Project

General

Profile

Maintaining static websites on staticweb » History » Version 5

Ahmed Bilal, 04/30/2020 08:03 AM

1 1 Ahmed Bilal
h1. Maintaining static websites on staticweb
2 2 Ahmed Bilal
3 1 Ahmed Bilal
h2. Work In Progress
4
5
1. Add DNS Entry under *dot-cdist/files/dns/zones/ungleich.ch*
6
<pre>
7
staticcms-staging           CNAME staticweb
8
</pre>
9
2. Run the following command on control server.
10
<pre><code class="shell">cd ~/.cdist; git pull; cdist config -bj7 -p9 -vv d{1..7}.ungleich.ch</code></pre>
11 5 Ahmed Bilal
3. Run the following commands on staticweb.ungleich.ch
12
<pre><code class="shell">
13
mkdir -p /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/www/u/
14
chown -R ungleichstatic /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/www/
15
</code></pre>
16 4 Ahmed Bilal
4. Create nginx config for the site under **/etc/nginx/sites-enabled/staticcms-staging.ungleich.ch**
17 3 Ahmed Bilal
<pre><code>#
18
# Manually created             
19
#
20
server {
21
    # Only bind on the reserved IP address(es)
22
23
    listen [::]:443;
24
    listen *:443;
25
26
    ssl on;
27
    ssl_certificate /etc/letsencrypt/live/staticcms-staging.ungleich.ch/fullchain.pem;
28
    ssl_certificate_key /etc/letsencrypt/live/staticcms-staging.ungleich.ch/privkey.pem;
29
30
    server_name staticcms-staging.ungleich.ch;
31
32
    index index.html index.htm;
33
        location / {
34
            root /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/www;
35
        }
36
    access_log /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/logs/access.log;
37
38
}
39
</code></pre>