Web Server: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (One intermediate revision by one other user not shown) | |||
| Line 13: | Line 13: | ||
== Updating Site Content == | == Updating Site Content == | ||
# Make changes locally and commit to GitHub | # Make changes locally and commit to GitHub | ||
# SSH into mainsqueeze: <code>ssh guernica@ | # SSH into mainsqueeze: <code>ssh guernica@wreckroom.nyc</code> | ||
# Navigate to the site and pull: | # Navigate to the site and pull: | ||
## <code>cd /volume2/wreckroom.nyc/wreckroom.nyc</code> (or justinbjur.com) | ## <code>cd /volume2/wreckroom.nyc/wreckroom.nyc</code> (or justinbjur.com) | ||
| Line 20: | Line 20: | ||
== PM2 == | == PM2 == | ||
'''PM2''' is a process manager that keeps both Next.js apps alive on | '''PM2''' is a process manager that keeps both Next.js apps alive on the server. | ||
=== Current Processes === | === Current Processes === | ||
| Line 26: | Line 26: | ||
! Name !! Command | ! Name !! Command | ||
|- | |- | ||
| <code>wreckroom.nyc</code> || <code>npm run | | <code>wreckroom.nyc</code> || <code>npm run start</code> | ||
|- | |- | ||
| <code>justinbjur.com</code> || <code>npm run | | <code>justinbjur.com</code> || <code>npm run start</code> | ||
|} | |} | ||
| Line 34: | Line 34: | ||
PM2 should auto-resume if <code>pm2 save</code> was run. If not, restart manually: | PM2 should auto-resume if <code>pm2 save</code> was run. If not, restart manually: | ||
# <code>cd /volume2/wreckroom.nyc/wreckroom.nyc</code> | # <code>cd /volume2/wreckroom.nyc/wreckroom.nyc</code> | ||
# <code>sudo pm2 start npm --name "wreckroom.nyc" -- run | # <code>sudo pm2 start npm --name "wreckroom.nyc" -- run start</code> | ||
# <code>cd /volume2/justinbjur.com/justinbjur.com</code> | # <code>cd /volume2/justinbjur.com/justinbjur.com</code> | ||
# <code>sudo pm2 start npm --name "justinbjur.com" -- run | # <code>sudo pm2 start npm --name "justinbjur.com" -- run start</code> | ||
# <code>sudo pm2 save</code> | # <code>sudo pm2 save</code> | ||
| Line 42: | Line 42: | ||
If a site is down and pm2 shows an error, delete and restart that process: | If a site is down and pm2 shows an error, delete and restart that process: | ||
# <code>sudo pm2 delete wreckroom.nyc</code> | # <code>sudo pm2 delete wreckroom.nyc</code> | ||
# <code>sudo pm2 start npm --name "wreckroom.nyc" -- run | # <code>sudo pm2 start npm --name "wreckroom.nyc" -- run start</code> | ||
# <code>sudo pm2 save</code> | # <code>sudo pm2 save</code> | ||
Latest revision as of 16:55, 28 April 2026
Synology Site Management[edit]
Both sites are hosted on mainsqueeze (Synology) behind NGINX Reverse Proxy, served over 443.
| Site | Local Port | Directory |
|---|---|---|
| wreckroom.nyc | localhost:3000 |
/volume2/wreckroom.nyc/wreckroom.nyc
|
| justinbjur.com | localhost:3001 |
/volume2/justinbjur.com/justinbjur.com
|
Updating Site Content[edit]
- Make changes locally and commit to GitHub
- SSH into mainsqueeze:
ssh guernica@wreckroom.nyc - Navigate to the site and pull:
cd /volume2/wreckroom.nyc/wreckroom.nyc(or justinbjur.com)git pull
- Restart pm2:
sudo pm2 restart wreckroom.nyc(or justinbjur.com)
PM2[edit]
PM2 is a process manager that keeps both Next.js apps alive on the server.
Current Processes[edit]
| Name | Command |
|---|---|
wreckroom.nyc |
npm run start
|
justinbjur.com |
npm run start
|
After a Synology Reboot[edit]
PM2 should auto-resume if pm2 save was run. If not, restart manually:
cd /volume2/wreckroom.nyc/wreckroom.nycsudo pm2 start npm --name "wreckroom.nyc" -- run startcd /volume2/justinbjur.com/justinbjur.comsudo pm2 start npm --name "justinbjur.com" -- run startsudo pm2 save
Troubleshooting[edit]
If a site is down and pm2 shows an error, delete and restart that process:
sudo pm2 delete wreckroom.nycsudo pm2 start npm --name "wreckroom.nyc" -- run startsudo pm2 save
Certificates[edit]
If you modify a certificate's FQDN, you must also update the reverse proxy entry.
Control Panel → Login Portal → Advanced → Reverse Proxy
Update the hostname there — without this step the site will not resolve correctly even after migrating the cert. This has cost half a day before, don't skip it.