The goal was to take the production build of the application and configure Nginx to serve it as a web server 🚀
Technologies Used:
React
Vite
Node.js
Express.js
Nginx
Ubuntu / WSL
Deployment Process:
Navigate to the project
cd /mnt/d/Doctpro-main/Doctpro-mainInstall dependencies
npm installCreate the production build
npm run build
This generated the dist folder containing the optimized production files.Prepare the Nginx web directory
sudo mkdir -p /var/www/doctpro
Then copied the production files:
sudo cp -r dist/* /var/www/doctpro/Configure Nginx
The Nginx configuration was edited using:
sudo nano /etc/nginx/sites-available/default
The application was configured to be served from:
/var/www/doctproVerify the configuration
sudo nginx -t
The configuration returned:
syntax is ok
test is successfulStart and verify Nginx
sudo service nginx start
Then:
sudo service nginx status
The server showed:
Active: active (running)Test the deployed application
curl http://localhost
I also verified the HTTP response using:
curl -I http://localhost
The server returned:
HTTP/1.1 200 OK
Server: nginx
Deployment Flow:
React + Vite Application
↓
npm run build
↓
dist/
↓
/var/www/doctpro
↓
Nginx
↓
Web Application
What I Learned
This task helped me understand the practical deployment flow of a web application — from creating a production build to configuring Nginx and verifying that the server is correctly serving the application.
I also learned that Nginx is not just a web server; it can act as an important layer between users and web applications.
Final Result
The Job Application web application was successfully deployed and served using Nginx.
This task gave me hands-on experience with:
Build → Deploy → Configure → Verify → Serve 🚀
Top comments (0)