8.3 KiB
8.3 KiB
Website Consolidation Complete - December 14, 2025
🎯 Understanding Your Setup
The "Two Websites" Situation EXPLAINED
YOU DON'T ACTUALLY HAVE TWO SEPARATE WEBSITES!
You have ONE website that can be accessed through TWO DIFFERENT URLs:
http://localhost- Local machine accesshttps://skyarts.ddns.net- Public domain access
Both URLs point to the EXACT SAME FILES in /var/www/skyartshop/
Think of it like your house having a front door and a back door - same house, just different ways to enter!
🏗️ Your Architecture
┌─────────────────────────────────────────────┐
│ Internet / Local Network │
└─────────────────┬───────────────────────────┘
│
┌─────────┴──────────┐
│ │
localhost skyarts.ddns.net
│ │
└─────────┬──────────┘
│
┌─────▼─────┐
│ NGINX │ (Port 80/443)
│ Reverse │
│ Proxy │
└─────┬─────┘
│
┌─────────┴──────────┐
│ │
Static Files Backend API
(HTML/CSS/JS) (Node.js:5000)
│ │
▼ ▼
/var/www/skyartshop/ Express Server
├── public/ ├── /api/admin/*
├── admin/ ├── /api/products
├── assets/ └── /api/blog/...
└── uploads/
📂 Single Website Structure
Location: /var/www/skyartshop/
skyartshop/
├── public/ ← Frontend (Customer-facing)
│ ├── index.html → Redirects to home.html
│ ├── home.html → Homepage
│ ├── shop.html → Product catalog
│ ├── product.html → Product details
│ ├── portfolio.html → Portfolio showcase
│ ├── blog.html → Blog listing
│ ├── about.html → About page
│ └── contact.html → Contact form
│
├── admin/ ← Backend Admin Panel
│ ├── login.html → Admin login
│ ├── dashboard.html → Admin dashboard
│ ├── products.html → Manage products
│ ├── blog.html → Manage blog posts
│ ├── portfolio.html → Manage portfolio
│ ├── pages.html → Manage custom pages
│ ├── menu.html → Manage navigation
│ ├── settings.html → Site settings
│ └── users.html → User management
│
├── assets/ ← Static resources
│ ├── css/
│ ├── js/
│ └── images/
│
└── uploads/ ← User-uploaded content
├── products/
├── portfolio/
└── blog/
🌐 How to Access Your Website
For YOU (Admin)
Admin Panel:
Public Frontend:
For CUSTOMERS (Public)
They will use:
They can browse:
- Home: https://skyarts.ddns.net/home.html
- Shop: https://skyarts.ddns.net/shop.html
- Portfolio: https://skyarts.ddns.net/portfolio.html
- Blog: https://skyarts.ddns.net/blog.html
- Contact: https://skyarts.ddns.net/contact.html
✅ What Was Just Deployed
I deployed all the files from your development folder to production:
✓ Public frontend pages
✓ Admin panel (with fixed navigation)
✓ Assets (CSS, JS, images)
✓ Proper directory structure
✓ Correct permissions
🔄 Workflow: Making Changes
1. Edit Files (Development)
cd /media/pts/Website/SkyArtShop/website/
# Edit files here:
nano public/home.html
nano admin/dashboard.html
2. Deploy to Production
sudo /media/pts/Website/SkyArtShop/deploy-website.sh
3. Test
# Clear browser cache!
# Then visit:
https://skyarts.ddns.net
🎨 Frontend vs Backend
Frontend (Public Website)
- Location:
/var/www/skyartshop/public/ - Technology: HTML, CSS, JavaScript
- Access: https://skyarts.ddns.net
- Purpose: What customers see
Backend (Admin Panel)
- Location:
/var/www/skyartshop/admin/ - Technology: HTML, CSS, JavaScript + Node.js API
- Access: https://skyarts.ddns.net/admin
- Purpose: Where you manage content
Backend API (Data Management)
- Location:
/media/pts/Website/SkyArtShop/backend/server.js - Technology: Node.js + Express + PostgreSQL
- Port: 5000
- Purpose: Handles data operations
🔧 Server Components
1. NGINX (Web Server)
- Ports: 80 (HTTP), 443 (HTTPS)
- Purpose: Serves HTML/CSS/JS files, routes API requests
- Status:
sudo systemctl status nginx - Reload:
sudo systemctl reload nginx
2. Node.js Backend (API Server)
- Port: 5000
- Purpose: Admin API, data management
- Status:
pm2 status - Restart:
pm2 restart skyartshop - Logs:
pm2 logs skyartshop
3. PostgreSQL (Database)
- Port: 5432
- Purpose: Store products, blog posts, users, etc.
- Status:
sudo systemctl status postgresql
📍 Important URLs
Public Access (Customers)
https://skyarts.ddns.net → Home
https://skyarts.ddns.net/shop.html → Shop
https://skyarts.ddns.net/portfolio.html → Portfolio
https://skyarts.ddns.net/blog.html → Blog
Admin Access (You)
https://skyarts.ddns.net/admin/login.html → Login
https://skyarts.ddns.net/admin/dashboard.html → Dashboard
API Endpoints (Backend)
http://localhost:5000/api/products → Product data
http://localhost:5000/api/blog/posts → Blog posts
http://localhost:5000/api/admin/session → Auth check
🚨 Important Notes
There Is Only ONE Website
localhostandskyarts.ddns.netshow the SAME content- They're just different ways to access it
- Changes to one affect both (because it's the same files!)
Deployment is Required
- Editing files in
/media/pts/Website/SkyArtShop/website/does NOT automatically update the live site - You MUST run the deployment script to apply changes
- Always clear browser cache after deploying
Cache Clearing is Critical
When you make changes:
- Deploy:
sudo /media/pts/Website/SkyArtShop/deploy-website.sh - Clear browser cache: Ctrl+Shift+Delete
- Or use incognito mode: Ctrl+Shift+N
🎯 Quick Commands
Deploy Website
sudo /media/pts/Website/SkyArtShop/deploy-website.sh
Deploy Admin Panel Only
sudo /media/pts/Website/SkyArtShop/deploy-admin-updates.sh
Restart Backend API
pm2 restart skyartshop
Check Backend Logs
pm2 logs skyartshop
Reload Nginx
sudo nginx -t && sudo systemctl reload nginx
Check What's Running
pm2 status # Backend API
sudo systemctl status nginx # Web server
sudo systemctl status postgresql # Database
💡 Next Steps
- Clear your browser cache (critical!)
- Visit: https://skyarts.ddns.net
- Test navigation - click around the frontend
- Login to admin - https://skyarts.ddns.net/admin/login.html
- Create content - add a product, blog post, etc.
- Verify frontend - check if content appears on public pages
🎨 Customizing the Layout
Want to change the design?
Edit Frontend
cd /media/pts/Website/SkyArtShop/website/public/
nano home.html # Edit homepage
nano shop.html # Edit shop page
Deploy Changes
sudo /media/pts/Website/SkyArtShop/deploy-website.sh
Test
# Visit https://skyarts.ddns.net
# Clear cache if needed
Status: ✅ Website Consolidated & Deployed
One Website, Two URLs: localhost & skyarts.ddns.net
All Files in: /var/www/skyartshop/
Last Updated: December 14, 2025, 00:35 UTC