You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: services/www/administration.md
+15-64Lines changed: 15 additions & 64 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,41 +4,11 @@ This page describes how to accomplish certain administration tasks on [WWW](./)
4
4
5
5
## SSL
6
6
7
-
Occasionally, SSLcertificates need to be renewed. We renew certificates yearly. The next time we will need to renew the SSL certificates is late this November.
7
+
We use Let's Encrypt for SSL, using Certbot. Let's Encrypt certificates expire every 90 days and are renewed every 60 days. Renewal is automated, but several other servers use the wildcard certificate and must pull the updated one. The most important of these are the mail servers, which use the certificate for SMTP. The script `update-ssl.sh` in the root home directory of Casey and Smith should handle this. After certificates are renewed, run the update-ssl script on:
Substitute 1718 with the appropriate school year. This command should be run in `/etc/apache2/ssl` -- be very careful to not overwrite existing files (i.e. make sure `tjhsst-1718.{key,csr}` don't already exist).
You'll need to add this to the Public-Key-Pins header in `/etc/nginx/ssl.conf`, following the existing format. Do this _**before**_ you actually rotate keys. Without doing this, browsers will be unable to access the website, and this is a bad thing. Read (the documentation on MDN)\[[https://developer.mozilla.org/en-US/docs/Web/HTTP/Public\_Key\_Pinning](https://developer.mozilla.org/en-US/docs/Web/HTTP/Public\_Key\_Pinning)] for more information about public key pinning.
26
-
27
-
Alternatively, generate a CSR using an already existing key, with:
Once you've received a certificate from the CA, put it alongside the private key using a similar naming format, like `tjhsst-1718.crt`. Create a certificate bundle/chained certificate file according to the instructions given by the CA (usually this looks something like `cat tjcsl_bundle.crt tjhsst-1718.crt > tjhsst-1718.chained.crt`).
36
-
37
-
You can now update the web server's SSL configuration in `/etc/nginx/ssl.conf`, making sure to replace the values of `ssl_certificate`, `ssl_certificate_key`, as well as `ssl_trusted_certificate` if it's necessary.
38
-
39
-
### Restart the web server
40
-
41
-
You can now restart nginx with `/etc/init.d/nginx restart`. If all goes well, the new SSL certificate should be in place.
9
+
* Mail servers (Smith and Casey)
10
+
* IPA servers, for the web ui
11
+
* Monitor/Grafana
42
12
43
13
## Scripts
44
14
@@ -47,37 +17,18 @@ This section contains various other scripts to do useful things on [WWW](./).
47
17
### What to do if the webserver goes down
48
18
49
19
1. Log in to remote.tjhsst.edu (or if you're already on the internal network, that's fine too)
50
-
2. If you're on remote, `kinit username/root`
51
-
3.`ssh root@www`
52
-
4.`reload-webserver`
53
-
54
-
This restarts nginx/Apache and ensures that the service manager is still in a consistent state. The website should work after this (if not, try clearing cache/etc, it's possible a redirect to an error page might've been cached, although it shouldn't be).
55
-
56
-
If this doesn't work, there are a few things you can try:
57
-
58
-
```
59
-
pkill k5start
60
-
pkill -9 k5start
61
-
pkill apache2
62
-
pkill -9 apache2
63
-
pkill nginx
64
-
pkill -9 nginx
65
-
service apache2 zap
66
-
service nginx zap
67
-
service apache2 start
68
-
service nginx start
69
-
```
70
-
71
-
This will make sure k5start/nginx/apache have actually been stopped (although possibly not cleanly) before restarting them. If this doesn't work, it's probably an issue with Kerberos / AFS -- make sure `/etc/krb5.keytab.www-data` exists and has the correct keys (`ktlist -K -k /etc/krb5.keytab.www-data`, you should see `www-data@CSL.TJHSST.EDU` listed at least once).
72
-
73
-
If all of that doesn't work, it's most likely not a problem with the web server -- perhaps check AFS or Kerberos for issues that might be causing a web problem.
20
+
2.`ssh root@www`
21
+
3.`systemctl restart nginx`
74
22
75
-
### Granting a user access to edit the website
23
+
This restarts nginx and ensures that the service manager is still in a consistent state. The website should work after this (if not, try clearing cache/etc, it's possible a redirect to an error page might've been cached, although it shouldn't be).
76
24
77
-
You'll need to be an [AFS admin](broken-reference), or ask someone who is, to simply run:
This will grant full access to `/afs/csl/web/www`, where the website files are located.
34
+
You can try running this manually to see the error. You can also look at the script in `/usr/local/bin/certbot-ipa-dns-update.sh` to see what it's supposed to do. 
0 commit comments