在Ubuntu中,可以使用apt命令来安装Apache HTTP服务器(httpd)。以下是在Ubuntu上安装Apache的命令:
sudo apt update
sudo apt install apache2 -y
下载完成后我们可以看一下它的配置信息:
dpkg -L apache2 | grep /etc
在Ubuntu上,可以使用tree
命令来以树状结构显示目录和文件。
apt install tree
tree /etc/apache2
下面要下载客户端指令:
sudo apt install curl -y
启动Apache HTTP服务器:
sudo systemctl start apache2
sudo systemctl status apache2
禁用 AppArmor 服务:
sudo systemctl stop apparmor
sudo systemctl disable apparmor
查看虚拟机的IP地址
使用windows输入IP地址即可看到新建的静态网站: