- Install dependencies
apt update
apt install -y lamp-server^
apt install -y phpmyadmin
a2enmod rewrite # to use permalinks and htaccess
service apache2 restart
adduser vagrant www-data
- Edit
/etc/apache/sites-enabled/000-default.conf
:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html/>
AllowOverride All
Require all granted
</Directory>
ErrorLog \${APACHE_LOG_DIR}/error.log
CustomLog \${APACHE_LOG_DIR}/access.log combined
</VirtualHost>