Hands-on in building a website

11 April 2025 Written by 
Published in AGI program
To host your consultancy website locally using ProxMox on an Ubuntu 22.04 server, follow these organized steps:
Step-by-Step Guide
Install ProxMox:
Download and install ProxMox from its official website using the CLI or graphical interface.
Create a Virtual Machine (VM):
Open ProxMox and create a new VM named "VM108" with sufficient RAM (e.g., 4GB) and disk space for your project needs.
Set Up Environment:
Install Ubuntu 22.04 in the VM to ensure it's up-to-date with the latest security patches, updates, and improvements.
Install Required Packages:
Add ProxMox repositories to manage dependencies within the VM.
sudo proxmxo repos add --name=proxmox_repos https://download.proxmox.com/repos/ubuntu/22.04-amd64
Install PHP 8.1 and other necessary tools for web development:
 sudo apt-get update && sudo apt-get install -y \
  php-8.1 \
  libphp7.4-dev \
  ./proxmox-php74-junk.deb \
  ./proxmox-php80-junk.deb \
  ./proxmox-php81-junk.deb
Install Apache:
Add the official PHP repository to install Apache:
sudo add-apt-repository ppa:php hosted/apache2
sudo apt-get update && sudo apt-get install -y apache2
Configure Apache settings and start it:
sudo nano /etc/apache2/ports.conf
sudo nano /etc/apache2/conf.d/apache2.conf
sudo systemctl enable apache2
Install WordPress:
Add the official repositories for WordPress packages.
sudo add-apt-repository ppa:php hosted/php-wpe
sudo add-apt-repository ppa:php hostedwordpress.org
sudo apt-get update && sudo apt-get install -y \
  dpkg-deb-encoded.php \
  php-wpe
Install WordPress using DNF:
sudo dnf update --proxies-only
sudo dnf install \
  -S \
  wordpress core files hooks meta-wordress-config \
  wordfence-wordpress-plugin wordfence-wordress-plugin-word-writing
Configure SSL Certificate:
Download a free SSL certificate from Let's Encrypt.
Install the SSL package for Apache:
sudo apt-get install -y ssi \
  www2.ssi \
  www.www.ssi
Create an .ssh/config file to manage SSH settings.
Create Static IP Address:
Use your VM's interface to set up a static IP:
ip addr show | grep lo | cut -d ' ' -f 1
Assign the static IP for external access, e.g., abc.com, and configure DNS if necessary.
Set Up Domain Name:
Use a third-party service like Namecheap to register your domain name with your VM's static IP.
Configure DNS records (A, CNAME) pointing to your VM's IP and external domains.
Testing and Configuration:
Test the web server settings by accessing the website through your static IP or external domain URL (e.g., http://abc.com).
Ensure dependencies are correctly installed and test your WordPress site loading.
Conclusion
By following these steps, you will have successfully set up a local web environment with Apache, PHP, WordPress, and an SSL certificate. This setup allows testing of your consultancy website before external deployment.

 

 

 

 

 

 

Read 78 times Last modified on Friday, 11 April 2025 17:21
Rate this item
(0 votes)

Leave a comment

Comment moderation has been enabled. All comments must be approved by the blog author.