About the Ubuntu configuration file, strictly speaking, Apache in Ubuntu (or Apache under Linux?I don’t know what the configuration file is for other distributions of Apache
/Etc/apache2/apache2. Conf, Apache will automatically read the configuration information of this file at startup. Other configuration files, such as httpd.conf And so on are included through the include instruction. These include lines can be found in apache2.conf
Citation
# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
# Include all the user configurations:
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/
Combined with the comments, you can clearly see the general function of each configuration file. Of course, you can put all the settings in apache2. Conf or httpd.conf Or any configuration file. Apache 2’s division is just a good habit.
The most important thing after installing Apache is to know where the root directory of Web documents is. For Ubuntu, the default is/var/www. How do you know?There is no DocumentRoot item in apache2. Conf, httpd.conf It’s empty again, so it must be in other files. After searching, we found that
/Etc/apache2/sites enabled/000 default
Citation
NameVirtualHost *
<VirtualHost *&>
ServerAdmin webmaster
@localhost
DocumentRoot /var/www/
Similar Posts:
- wampserver 3.0.4 Same LAN Error: You don’t have permission to access /index.php on this server
- [Solved] Apache Warning: DocumentRoot must be a directory
- Xampp modify the port number Apache service detected with wrong [How to Solve]
- Job for apache2.service failed because the control process exited with error code. See “syst…
- Apache was unable to start solving the requested operation has failed
- [Solved] Apache Startup Error: httpd: apr_sockaddr_info_get() failed for
- How to Solve Apache2.4 Reason: Error reading from remote server
- [Solved] Mac docker Build Image apt-get update Error: GPG Signature Error
- ServerRoot must be a valid directory
- Aapache can’t start, error message: suexec mechanism enabled (wrapper: / usr / SBIN / suexec)