Access
- Open VuePress:
http://<SERVER_IP>
Edit & Publish Content
1. Add or edit Markdown files: /opt/vuepress/docs
2. If you add or rename pages, update /opt/vuepress/docs/.vuepress/config.js for navigation and sidebar entries.
3. Rebuild the site:
cd /opt/vuepress && npm run docs:build
Nginx serves the generated files from: /opt/vuepress/docs/.vuepress/dist
No Nginx restart is required after rebuilding.
Important Paths
- Project:
/opt/vuepress - Content:
/opt/vuepress/docs - Configuration:
/opt/vuepress/docs/.vuepress/config.js - Build output:
/opt/vuepress/docs/.vuepress/dist - NGINX configuration:
/etc/nginx/sites-available/vuepress.conf
Domain & HTTPS
1. Point your domain to the server's IP address.
2. Edit Nginx config and replace server_name _; with your domain (e.g., server_name <YOUR_DOMAIN>;):
vim /etc/nginx/sites-available/vuepress.conf
3. Test the configuration:
nginx -t
4. Install Certbot:
apt install -y certbot python3-certbot-nginx
5. Generate a Let's Encrypt certificate:
certbot --nginx --non-interactive --agree-tos --email <YOUR_EMAIL> -d <YOUR_DOMAIN>
6. Reload Nginx:
systemctl reload nginx
7. Open your browser and visit: https://<YOUR_DOMAIN>