Ubuntu Server version of apache series installation, restart, start, version view

Before installing, first check whether it has been installed

apt list --installed | grep tool

tool: the name to be detected, such as mysql, apache, ngnix, etc.

insert image description here

install apache

sudo apt install apache2

Installing apache is enabled by default

You can check
insert image description here
the service through the browser apache stop # apache stop service
insert image description here

Opening, closing, and restarting services in Linux

1. service service name stop
2. service service name start
3. service service name restart
or
1. systemctl stop service name systemctl stop apache2
2. systemctl restart service name systemctl restart apache2 systemctl reload apache
3. systemctl start service name systemctl start apache2
4 systemctl status apache2

/var/www Directory for placing web pages
/var/log/apache2/
insert image description here
insert image description here

insert image description here

The directory where the /etc/apache2 configuration file is located
insert image description here

Check the apache version installed on Ubuntu

dpkg -l |grep apache2
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/u013400314/article/details/131973053