For the Ubuntu configuration file apache2 httpd. conf location, for the ubuntu configuration file, we should strictly describe Apache of Ubuntu (or should we say Apache under Linux? The configuration file of other apache software packages is/etc/apache2/apache2.conf. Apache automatically reads the configuration information of this file at startup. Some other configuration files, such as httpd. conf, are included through the Include command. In apache2.conf, you can find these Include rows: Reference # Include module configuration: Include/etc/apache2/mod-enabled /*. load Include/etc/apache2/mod-enabled /*. conf # Include all the user invocations: Include/etc/apache2/httpd. conf # Include ports listing Include/etc/apache2/ports. conf ...... # Include generic snippets of statements Include/etc/apache2/conf. d/# Include the virtual host configurations: Include/etc/apache2/sites-enabled/with comments, you can clearly see the general role of each configuration file. Of course, you can put all the settings in apache2.conf, httpd. conf, or any configuration file. This classification of Apache2 is just a good habit. The most important thing after installing Apache is to know where the Web document root directory is. For Ubuntu, the default value is/var/www. How do you know? There is no DocumentRoot entry in apache2.conf, and httpd. conf is empty, so it must be in other files. After searching, it is found that the content in/etc/apache2/sites-enabled/000-default contains the following content: reference NameVirtualHost * <VirtualHost *> ServerAdmin webmaster @ localhost DocumentRoot/var/www/