Last active
December 19, 2022 08:13
-
-
Save Sanjay007/af2d1fe23846f2930d894e7babcfafe6 to your computer and use it in GitHub Desktop.
Setup Virtual Host Ubuntu Using Apache2
This file contains hidden or 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
sudo mkdir -p /var/www/inhireapp.com/public_html | |
sudo chown -R $USER:$USER /var/www/inhireapp.com/public | |
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/example.com.conf' | |
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
ServerName example.com | |
ServerAlias www.example.com | |
DocumentRoot /var/www/example.com/public_html | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
</VirtualHost> | |
sudo a2ensite example.com.conf | |
sudo a2ensite test.com.conf | |
sudo a2dissite 000-default.conf | |
sudo systemctl restart apache2 | |
https://thelinuxterminal.com/how-to-install-apache-server-ubuntu-22-10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment