Browse Source

confs; def => default

tags/v2.0.0
Robin Thoni 9 years ago
parent
commit
f205532367
7 changed files with 33 additions and 2 deletions
  1. 2
    2
      sitegen.sh
  2. 0
    0
      sitegen/default
  3. 0
    0
      sitegen/default.conf
  4. 3
    0
      sitegen/http
  5. 3
    0
      sitegen/http.conf
  6. 19
    0
      sitegen/reverse
  7. 6
    0
      sitegen/reverse.conf

+ 2
- 2
sitegen.sh View File

4
 
4
 
5
 if [ $# -eq 0 ] || [ $# -gt 2 ]
5
 if [ $# -eq 0 ] || [ $# -gt 2 ]
6
 then
6
 then
7
-  echo "Usage:" $(basename $0) "hostname [config=def]" >&2
7
+  echo "Usage:" $(basename $0) "hostname [config=default]" >&2
8
   exit 1
8
   exit 1
9
 fi
9
 fi
10
 
10
 
13
 then
13
 then
14
   conf="$2"
14
   conf="$2"
15
 else
15
 else
16
-  conf="def"
16
+  conf="default"
17
 fi
17
 fi
18
 
18
 
19
 def="/etc/sitegen/${conf}"
19
 def="/etc/sitegen/${conf}"

sitegen/def → sitegen/default View File


sitegen/def.conf → sitegen/default.conf View File


+ 3
- 0
sitegen/http View File

1
+<VirtualHost *:80>
2
+    Include sites-available/%%HOST%%.conf
3
+</VirtualHost>

+ 3
- 0
sitegen/http.conf View File

1
+ServerName %%HOST%%
2
+DocumentRoot /var/%%HOST%%
3
+ServerAlias %%HOST%%

+ 19
- 0
sitegen/reverse View File

1
+<IfModule mod_ssl.c>
2
+    <VirtualHost *:80>
3
+        ServerName %%HOST%%
4
+        Redirect permanent / https://%%HOST%%/
5
+    </VirtualHost>
6
+    <VirtualHost *:443>
7
+        Include sites-available/%%HOST%%.conf
8
+
9
+        SSLEngine on
10
+        SSLCertificateFile /etc/ssl/private/%%HOST%%.crt
11
+        SSLCertificateKeyFile /etc/ssl/private/%%HOST%%.key
12
+        SSLCertificateChainFile /etc/ssl/certs/sub.class1.server.ca.pem
13
+    </VirtualHost>
14
+</IfModule>
15
+<IfModule !mod_ssl.c>
16
+    <VirtualHost *:80>
17
+        Include sites-available/%%HOST%%.conf
18
+    </VirtualHost>
19
+</IfModule>

+ 6
- 0
sitegen/reverse.conf View File

1
+ServerName %%HOST%%
2
+ServerAlias %%HOST%%
3
+ProxyPreserveHost On
4
+ProxyRequests off
5
+ProxyPass / https://%%HOST%%/
6
+ProxyPassReverse / https://%%HOST%%/

Loading…
Cancel
Save