Minggu, 10 November 2019

enable virtual host baru

  1. Go to terminal and copy the default virtual host configuration to a new one (sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/mynewsite.conf)
  2. Edit this new file (sudo gedit /etc/apache2/sites-available/mynewsite.conf) and change the DocumentRoot to your own (save and close..)
  3. Enable this new configuration file (sudo a2ensite mynewsite.conf) and dissable the default one (sudo a2dissite 000-default.conf)
  4. Edit the apache2.conf (sudo gedit /etc/apache2/apache2.conf) and change the default -section into this:  <Directory [write_your_dir_here]> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> (save and close..)
  5. Restart Apache2 (sudo service apache2 restart)
If it already works: great!

Tidak ada komentar:

Posting Komentar