💜 Get a discount on any purchase on the Hostinger website!
👉 https://bit.ly/4aKVdf1
Learn how to install and configure the Apache server on your Hostinger Ubuntu VPS, step by step!
In this tutorial, you'll see how to get your server ready to host websites, systems, and applications professionally and securely.
🔧 In this video you will learn:
How to update the Ubuntu system
How to install Apache correctly
How to check if the server is working
How to configure directories and permissions
How to test your website in the browser
Ideal for those starting with VPS, Linux hosting, and dedicated servers, and who want to master Apache, one of the most widely used web servers in the world!
💬 Did you like the video? Leave a like, comment what you thought, and subscribe to the VPS Wizard channel for more tutorials on servers, VPS, and Hostinger!
#Apache #VPS #Hostinger #Ubuntu #WebServer #Linux #Tutorial #VPSWizard
Below is the order of the commands used in the video:
1. *Install Apache*
If Apache is not installed, run:
sudo apt update
sudo apt install apache2
2. *Create a Directory for the Domain*
Create a directory for your domain where the website files will be hosted:
sudo mkdir -p /var/www/wizardguides.online/public_html
Set the appropriate permissions:
sudo chown -R $USER:$USER /var/www/wizardguides.online/public_html
sudo chmod -R 755 /var/www/wizardguides.online
3. *Create a Virtual Host Configuration File*
Create a configuration file for the Domain:
sudo nano /etc/apache2/sites-available/wizardguides.online.conf
Add the following content, replacing `wizardguides.online` with your domain details:
(smaller) VirtualHost *:80 (larger)
ServerAdmin [email protected]
ServerName wizardguides.online
ServerAlias www.wizardguides.online
DocumentRoot /var/www/wizardguides.online/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
(smaller)/VirtualHost (larger)
NOTE: Replace "smaller" and "larger" with the respective symbols as shown in the video. Including these symbols in the description is not allowed on YouTube.
4. *Activate the Virtual Host*
Activate the configuration for your new domain:
sudo a2ensite wizardguides.online.conf
Disable the default host (optional):
sudo a2dissite 000-default.conf
5. *Restart Apache*
Restart Apache to apply the changes:
sudo systemctl restart apache2
6. Configure the Firewall (optional)
Ensure that the firewall is allowing HTTP and HTTPS traffic:
sudo ufw allow 'Apache Full'
7. *Configure DNS*
In your DNS control panel, configure the domain to point to your VPS's IP address.
8. *Test the Configuration*
Access your domain in your browser to verify that everything is working correctly.