Project

General

Profile

Maintaining static websites on staticweb » History » Version 3

Ahmed Bilal, 04/29/2020 09:32 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
3. Run the following command on staticweb.ungleich.ch
12
<pre><code class="shell">mkdir -p /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/www/u/</code></pre>
13 3 Ahmed Bilal
4. Create nginx config for the site
14
<pre><code>#
15
# Manually created             
16
#
17
server {
18
    # Only bind on the reserved IP address(es)
19
20
    listen [::]:443;
21
    listen *:443;
22
23
    ssl on;
24
    ssl_certificate /etc/letsencrypt/live/staticcms-staging.ungleich.ch/fullchain.pem;
25
    ssl_certificate_key /etc/letsencrypt/live/staticcms-staging.ungleich.ch/privkey.pem;
26
27
    server_name staticcms-staging.ungleich.ch;
28
29
    index index.html index.htm;
30
        location / {
31
            root /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/www;
32
        }
33
    access_log /home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/logs/access.log;
34
35
}
36
</code></pre>