Questions & Answers
Questions & Answers
Questions & Answers
Open the Default Virtual Host File
The default virtual host configuration file for Apache is usually located at /etc/apache2/sites-available/000-default.conf. You can open it using a text editor like nano . Here’s how to do it with nano:
sudo nano /etc/apache2/sites-available/000-default.conf
add this in your virtual host
<VirtualHost *:80>
ServerName your-domain.com
DocumentRoot /path/to/your/application/public
<Directory /path/to/your/application/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
then restart apache2
sudo systemctl restart apache2