Description of Apache configuration file in Ubuntu

Source: Internet
Author: User
This semester I learned something about the Web Front-end, including HTML and JS, and some other frameworks or technologies such as JQuery, PHP, and Ajax. I configured the Apache server in Windows a few days ago, in Windows, the apache configuration file is in the conf directory under its directory [httpd. conf]. I also configured the Apache environment in Ubuntu yesterday and found that the configuration file is divided into multiple files [in the/etc/apache2 directory, package

This semester I learned something about the Web Front-end, including HTML and JS, and some other frameworks or technologies such as JQuery, PHP, and Ajax. I configured the Apache server in Windows a few days ago, in Windows, the apache configuration file is in the conf directory under its directory [httpd. conf]. I also configured the Apache environment in Ubuntu yesterday and found that the configuration file is divided into multiple files [in the/etc/apache2 directory, including apache2.conf and conf. d. envvars and httpd. conf, mod-avaliable, mod-enabled, ports. conf, sites-avaliable, and sites-enables ].

Apache2.conf File, apache's main configuration file, the configuration in it will affect the global
Conf. d Directory, including the configuration file will also affect the global, other packages if you need to use apache to serve it, it may add files and symbolic links to it (similar to the shortcut in windows)
Envvars File, which contains apache environment variable settings
Httpd. conf File, which was previously used as the main configuration file of apache, is named according to the httpd service process. Now you can use it for some user-specific configurations.
Mod-avaliable Directory, including the configuration of available modules and loading files, httpd in windows. the conf file contains LoadModule ***** _ module modules/mod _***. so statements are used to load additional modules, but not all modules have their configuration files.
Mod-enabled Directory. The files in the directory point to the symbolic link of the files under the directory named "mod-avaliable. If you want to load the functions of a module, you just need to create a symbolic link to the module configuration file in the mod-avaliable directory. Restart the apache service.
Ports. conf The command in the file determines which TCP port apache listens.
Sites-avaliable Directory, which is mainly used to configure the virtual host (if you want to configure the virtual host in httpd. conf in windows, it can be included in Xxoo If there are multiple hosts, you can configure them in several files.
Sites-enables Directory. The principle is the same as that of "mod-enabled". When enabled, the corresponding configuration files under the sites-avaliable directory are created with a symbolic link in the directory, and then the apache service is restarted.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.