Apache: Difference between revisions

From Piszczynski
piszczynski>Aleks
(Created page with " == Apache web server details == main directory: /etc/apache2 There are a number of plaintext files and some subdirectories within this directory. Here are some useful locat...")
 
piszczynski>Aleks
Line 21: Line 21:
These directories define modules that can be optionally loaded. The directories contain two components: files ending in .load, which contain fragments that load particular modules, and files ending in .conf, which store the configurations of these modules.
These directories define modules that can be optionally loaded. The directories contain two components: files ending in .load, which contain fragments that load particular modules, and files ending in .conf, which store the configurations of these modules.
Apache configuration does not take place in a single monolithic file, but instead happens through a modular design where new files can be added and modified as needed.
Apache configuration does not take place in a single monolithic file, but instead happens through a modular design where new files can be added and modified as needed.
===Apache2.conf file===

Revision as of 00:03, 7 November 2023

Apache web server details

main directory: /etc/apache2

There are a number of plaintext files and some subdirectories within this directory. Here are some useful locations to be familiar with:

  • apache2.conf:

This is the main configuration file for the server. Almost all configuration can be done from within this file, although it is recommended to use separate, designated files for simplicity. This file will configure defaults and be the central point of access for the server to read configuration details.

  • ports.conf:

This file is used to specify the ports that virtual hosts should listen on. Be sure to check that this file is correct if you are configuring SSL.

  • sites-available/ and sites-enabled/:

The sites-available directory contains virtual host file configurations. Configurations within this folder will establish which content gets served for which requests. This is enabled through linking to the sites-enabled directory, which stores activated virtual host configuration files. When Apache starts or reloads, it reads the configuration files and links from within the sites-enabled directory as it compiles a full configuration.

  • conf-available/ and conf-enabled/:

These directories house configuration fragments that are unattached to the virtual host configurations files.

  • mods-enabled/ and mods-available/:

These directories define modules that can be optionally loaded. The directories contain two components: files ending in .load, which contain fragments that load particular modules, and files ending in .conf, which store the configurations of these modules. Apache configuration does not take place in a single monolithic file, but instead happens through a modular design where new files can be added and modified as needed.

Apache2.conf file