Overview
The recommended model is straightforward: point the domain DNS to the server IP, configure the site in the hosting panel,
validate that the web server responds on HTTP, connect the application source to GitHub, and deploy the production build.
Architecture
Developer Workstation
│
├── Local source code repository
├── Next.js / React application
└── Git push to remote origin
│
▼
GitHub Repository
│
▼
Linux Server / VPS Instance
│
┌─────────┴─────────┐
│ │
▼ ▼
Hosting Control Panel Web Server (HTTP/HTTPS)
│ │
└─────────┬─────────┘
▼
Public Domain Name
│
▼
End Users
Domain & DNS Configuration
Identify the public server IP.
Create or verify the A record.
Create or verify the WWW record.
Allow time for propagation.
Control Panel Setup
Required
- Add the domain in the hosting panel
- Enable hosting
- Confirm the correct document root
Recommended
- Use a generic release path
- Keep backup-friendly structure
- Verify domain/IP bindings
Port 80 Validation
sudo ss -tulpn | grep ':80'
sudo systemctl status nginx
sudo systemctl status apache2
curl -I http://example.com
curl -I http://SERVER_PUBLIC_IP
GitHub Workflow
cd /path/to/project
git status
git add .
git commit -m "Update deployment content"
git push origin main
Next.js Build Process
npm install
npm run dev
npm run build
npm run start
Testing Checklist
- Domain resolves to the intended public IP
- HTTP responds correctly
- Build succeeds without errors
- Static assets and routes load properly
Troubleshooting
DNS resolves incorrectly
Review A and CNAME records and confirm the target IP.
No page loads on HTTP
Check firewall rules, service status, and virtual host configuration.
Default page appears
The wrong vhost or document root is taking precedence.
Build fails on server
Compare Node.js version, env vars, permissions, and dependencies.