- Nginx is installed (
nginx -vshould return a version) - Your Node.js server is running via PM2 on port
3000 - You’ve built the admin panel for your topology (see build commands below)
- You’ve replaced
/path/to/NodeForgeCMSwith the actual absolute path to your project root on disk
Build the Admin Panel
The admin panel is a static Vue application that must be compiled before Nginx can serve it. The build command differs by topology:- Separate Domains
admin/dist/. Nginx will serve this directory directly from admin.yourdomain.com.Nginx Configuration
- Separate Domains
With the separate-domain topology, the public site and the admin panel each get their own Enable the config and reload Nginx:
server block. The public site proxies all traffic to the Node.js server; the admin panel is served as static files with only the /api/ path proxied back to Node.js.Create or edit /etc/nginx/sites-available/nodeforge with the following content:Enable HTTPS with Let’s Encrypt
Starting the Node.js Server with PM2
Nginx proxies to a Node.js process on port 3000. Use PM2 to manage that process:| Task | Command |
|---|---|
| View running processes | pm2 list |
| Stream live logs | pm2 logs nodeforge-server |
| Restart the server | pm2 restart nodeforge-server |
| Zero-downtime reload | pm2 reload nodeforge-server |
| Stop the server | pm2 stop nodeforge-server |