Quick steps to create a new Apache web site. The FQDN of the web site is “acme.org”
Create a virtual host file for the new site
/etc/apache2/sites-available/acme.org<VirtualHost *:80>
ServerAdmin webmaster@acme.org
ServerName acme.org
ServerAlias www.acme.org
# Indexes + Directory Root.
DirectoryIndex index.html
DocumentRoot /var/www/acme.org
# Logfiles
ErrorLog
/var/www/acme.org/logs/error.log
CustomLog
/var/www/acme.org/logs/access.log combined
</VirtualHost>
- Create necessary folders & file
/var/www/acme.org
/var/www/acme.org/index.html
/var/www/acme.org/mfa
/var/www/acme.org/mfa/index.html
/var/www/acme.org/logs - Enable the new web site
sudo a2ensite acme.org - Restart Apache Server
sudo /etc/init.d/apache2 restart - Test it