- Added /admin redirect to login page in nginx config - Fixed backend server.js route ordering for proper admin handling - Updated authentication middleware and routes - Added user management routes - Configured PostgreSQL integration - Updated environment configuration
4.4 KiB
4.4 KiB
Quick IIS Deployment Guide - Sky Art Shop
⚡ Simplified Deployment (5 Steps)
Step 1: Install Prerequisites (One-Time)
A. Enable IIS
- Run PowerShell as Administrator
- Execute:
cd "E:\Documents\Website Projects\Sky_Art_Shop"
.\deploy.ps1 -InstallIIS
- Restart your computer
B. Install .NET 8.0 Hosting Bundle
- Download from: https://dotnet.microsoft.com/download/dotnet/8.0
- Look for "Hosting Bundle"
- Install and restart computer
Step 2: Deploy Your Site
Run PowerShell as Administrator:
cd "E:\Documents\Website Projects\Sky_Art_Shop"
.\deploy.ps1 -CreateSite
That's it! The script handles everything:
- ✅ Publishing the application
- ✅ Creating IIS site
- ✅ Setting permissions
- ✅ Configuring firewall
Step 3: Verify MongoDB is Running
# Check if MongoDB is running
Get-Service -Name MongoDB* -ErrorAction SilentlyContinue
# If not running, start it
net start MongoDB
Step 4: Test Locally
- Open browser
- Go to: http://localhost
- You should see your site!
If you get errors:
# Check IIS status
Get-WebSite -Name "SkyArtShop"
# Restart IIS
iisreset /restart
# Check what's using port 80
netstat -ano | findstr :80
Step 5: Configure Network (For Internet Access)
A. Set Static IP
- Control Panel → Network → Properties
- Set static IP (e.g., 192.168.1.100)
B. Router Port Forwarding
- Login to your router (usually 192.168.1.1)
- Forward port 80 → your PC's IP (192.168.1.100)
C. No-IP Client
- Download: https://www.noip.com/download
- Install and login
- Your site will be at: http://your-hostname.ddns.net
🔄 Updating Your Site
When you make changes:
cd "E:\Documents\Website Projects\Sky_Art_Shop"
.\deploy.ps1 -UpdateOnly
🆘 Quick Troubleshooting
Site won't load locally:
# Restart IIS
iisreset /restart
# Check site status
Get-WebSite -Name "SkyArtShop"
# If stopped, start it
Start-WebSite -Name "SkyArtShop"
502.5 Error:
- You need to install .NET 8.0 Hosting Bundle
- Restart computer after installing
403 Forbidden:
# Fix permissions
icacls "C:\inetpub\wwwroot\skyartshop" /grant "IIS_IUSRS:(OI)(CI)F" /T
iisreset /restart
Can't access from internet:
- Check port forwarding on router
- Make sure No-IP DUC is running
- Test your public IP directly first
📝 Your URLs After Deployment
- Local: http://localhost
- Local Network: http://192.168.1.100 (your IP)
- Internet: http://your-hostname.ddns.net
⚙️ Manual Deployment (If Script Fails)
If the automated script doesn't work, follow these steps:
1. Publish Application
cd "E:\Documents\Website Projects\Sky_Art_Shop"
dotnet publish SkyArtShop.csproj -c Release -o "C:\inetpub\wwwroot\skyartshop"
2. Create IIS Site Manually
- Open IIS Manager (search in Windows Start)
- Right-click Sites → Add Website
- Site name: SkyArtShop
- Physical path: C:\inetpub\wwwroot\skyartshop
- Port: 80
- Click OK
3. Configure Application Pool
- Click Application Pools
- Right-click SkyArtShop → Basic Settings
- .NET CLR version: No Managed Code
- OK
4. Set Permissions
icacls "C:\inetpub\wwwroot\skyartshop" /grant "IIS_IUSRS:(OI)(CI)F" /T
icacls "C:\inetpub\wwwroot\skyartshop" /grant "IUSR:(OI)(CI)F" /T
5. Configure Firewall
New-NetFirewallRule -DisplayName "SkyArtShop-HTTP" -Direction Inbound -Protocol TCP -LocalPort 80 -Action Allow
6. Start Site
Start-WebSite -Name "SkyArtShop"
🎯 Deployment Checklist
- IIS installed
- .NET 8.0 Hosting Bundle installed
- Computer restarted after installations
- MongoDB running
- Application published to C:\inetpub\wwwroot\skyartshop
- IIS site created
- Application pool set to "No Managed Code"
- Permissions granted
- Firewall rule added
- Site accessible at http://localhost
- (Optional) Static IP configured
- (Optional) Router port forwarding
- (Optional) No-IP client installed
For the full detailed guide, see DEPLOYMENT_GUIDE.md