Contents
What is 000-default conf apache2?
In Apache on Ubuntu, all the virtual host configuration files are stored under /etc/apache2/sites-available directory. With the new Apache installation you can find a default virtual host file called 000-default. conf there. We will create a new virtual host configuration file by copying 000-default.
How do you edit etc apache2 sites enabled 000-default?
3 Answers
- First check to see who owns the file: ls -l /etc/apache2/sites-available/000-default.conf.
- Verify you have permissions to act as that user, e.g.: sudo -u www-data id.
- Edit the file as the owner of the file: sudo -u www-data vi /etc/apache2/sites-available/000-default.conf.
What is the difference between sites available and sites enabled?
sites-available: this directory has configuration files for Apache 2 Virtual Hosts. Virtual Hosts allow Apache 2 to be configured for multiple sites that have separate configurations. sites-enabled: like mods-enabled, sites-enabled contains symlinks to the /etc/apache2/sites-available directory.
Why is Apache site config file 000-default.conf disabled?
When a change to any configuration file is made, Apache has to be restarted. Apache caches configurations in memory and changes will not be seen until it is restarted. On rare occasions, a restart does not work as expected.
Is it OK to leave Apache default.conf file alone?
Just as a matter of explanation for future users. Your 000-default.conf file is a catch-all site and should be left alone. It is good for security. It can be frustrating when a site configuration does not work and the default site is served. I get it. Still, leave it alone.
What does the 000-default.conf site mean?
The 000-default.conf site is a catch-all for any request the server does not have a configuration file for. If you have a domain name and it is resolving okay, the request should be for the domain name. If there is not configuration for that domain name, then it will use default which is what you want.
Is the Apache2 default page still accessible after a2dissite?
To my surprise, after that, the site is still accessible: Re-loading and shift-reloading in Firefox still shows the page and I can see the requests in /var/log/apache2/other_vhosts_access.log. Running the a2dissite command again shows Site 000-default already disabled and the directory /etc/apache2/sites-enabled/ is empty.