Creating a Default VirtualHost Configuration in Apache

When setting up an Apache web server, it’s important to handle requests that don’t match any specific hostname. This is achieved through a default VirtualHost configuration. Learn how to create a default VirtualHost to efficiently manage such requests.

1
2
3
4
5
6
7
8
9
<VirtualHost *:80>
   ServerName default
   DocumentRoot /var/www/default
   <Directory /var/www/default>
       Options FollowSymLinks
       AllowOverride None
       Require all granted
   </Directory>
</VirtualHost>

In this guide, you’ll discover how to set up the default VirtualHost configuration, enabling your server to handle unmatched requests effectively. This approach ensures a seamless user experience and proper organization of your web server.

0%