Configurate apache2 - basic
Configuration files of Apache2 are in /etc/apache2/
Basic Configuration
There are 2 folders in /etc/apache2
are for basic configuration. The file /etc/apache2/sites-available/000-default.conf
is enabled by /etc/apache2/sites-enabled/000-default.conf
which is a link file
├── sites-available
│ ├── 000-default.conf
│ ├── default-ssl.conf
└── sites-enabled
└── 000-default.conf -> ../sites-available/000-default.conf
In 000-default.conf
, set DocumentRoot to the folder where index.html located. The 80 port services for HTTP.
<VirtualHost *:80>
DocumentRoot /var/www/default
</VirtualHost>
Once the apache service is started, HTTP server runs in background.