Created
June 30, 2023 18:27
-
-
Save sabrysuleiman/098bf389f9b28df2ac7d8c0b40b54470 to your computer and use it in GitHub Desktop.
Set Up Apache Virtual Hosts on Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set Up Apache Virtual Hosts on Ubuntu | |
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/domain.conf | |
sudo nano /etc/apache2/sites-available/domain.conf | |
ServerAdmin webmaster@localhost | |
ServerName your_domain_1 | |
ServerAlias www.your_domain_1 | |
DocumentRoot /var/www/html | |
sudo a2ensite domain.conf | |
sudo apache2ctl configtest | |
sudo systemctl restart apache2 | |
sudo systemctl status apache2 | |
sudo nano /etc/hosts | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment