Administration
This page describes how to accomplish certain administration tasks on WWW
SSL
Occasionally, SSL certificates need to be renewed. We renew certificates yearly. The next time we will need to renew the SSL certificates is late this November.
Before certificate renewal comes up
Generate a new private key and CSR with:
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).
Get the public key pin information using
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] for more information about public key pinning.
Alternatively, generate a CSR using an already existing key, with:
Rotating the certificate
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
).
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.
Restart the web server
You can now restart nginx with /etc/init.d/nginx restart
. If all goes well, the new SSL certificate should be in place.
Scripts
This section contains various other scripts to do useful things on WWW.
What to do if the webserver goes down
Log in to remote.tjhsst.edu (or if you're already on the internal network, that's fine too)
If you're on remote,
kinit username/root
ssh root@www
reload-webserver
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).
If this doesn't work, there are a few things you can try:
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).
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.
Granting a user access to edit the website
You'll need to be an AFS admin, or ask someone who is, to simply run:
This will grant full access to /afs/csl/web/www
, where the website files are located.
Last updated