0

I am trying to setup the 000-default.conf vhost file on my apache2 server so that if anyone points their domain name to my servers ip address but the domain has no matching vhost file the server will load a default website located in /var/www/html folder

Below is the content of my 000-default.conf file issue is is does not seem to work even though I did enabled it and restarted apache2

<VirtualHost *:80>
    ServerName 123.456.789.19 //fake ip just because I don't want to post my real servers ip
    ServerAlias *
    ServerAdmin devops@mydomain.com
    DocumentRoot /var/www/html

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Jayreis
  • 145
  • 15
  • It already was a catch-all as shipped to you. It should not have needed any changes. What exactly was happening? – Michael Hampton Oct 01 '20 at 18:20
  • Well this is a server I inherited and looked like my predecessor removed the default vhost files which is why I am asking – Jayreis Oct 01 '20 at 20:14

0 Answers0