Apache
Tags: @server @apache @domain
To add a new domain
- Create a conf file:
- nano /etc/apache2/sites-available/faaiz.org.conf
- Inside the conf file:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName faaiz.org
ServerAlias www.faaiz.org
DocumentRoot /var/www/faaiz.org
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
- create your site directory: > sudo mkdir /var/www/faaiz.org
- assign ownership: > sudo chown -R $USER:$USER /var/www/faaiz.org
- assign permissions: > sudo chmod -R 755 /var/www/faaiz.org
- make index page: > touch /var/www/faaiz.org/index.html
- enable site: > sudo a2ensite faaiz.org.conf
- reload apache: > sudo systemctl reload apache2 or restart apache2