Wiki/Nginx: Difference between revisions

1,010 bytes added ,  00:18, 13 October 2023
no edit summary
No edit summary
No edit summary
 
Line 1: Line 1:
Up to: [[Part Of::Wiki]]
Up to: [[Part Of::Wiki]]
== Process ==
=== Switching Domains ===
from neuromatch.io to neuromatch social:
* swap domains in config
* comment out the http redirect server block and the cert part of the https block
* temporarily switch the `listen[::]:443` and `listen 443` for `listen[::]:80` and `listen 80`
* run certbot `sudo certbot --nginx -d wiki.neuromatch.social`  which should switch the `80`'s back to `443` and create a new http block
* copy paste the redirect block and old cert info to redirect http and https from old domain to new domain
that's probably a pretty janky way to do it, but basically the only thing that's different from just ctrl+f'ing the domain name is the need to issue a new cert, and to issue the cert you need to have just a server block listening on `80` and certbot can take it from there. then redirecting is just "hey did you try to go here actually go over there." There are other auth mechanisms certbot can do but that's the easiest way do use the default one that i know of
== Config ==


<syntaxhighlight lang="nginx">
<syntaxhighlight lang="nginx">