Create a webpage through httpd service under liunx
Just turn on the virtual machine, you need to mount it first
mount /dev/sr0 /mnt, mount /mnt first.
nmcli connection modify ens160 connection.autoconnect yes start httpd package
dnf install httpd -y install httpd package
systemctl is-enabled firewalld View firewall status
firewall-cmd --permanent --add-service=http firewall allows httpd service
firewall-cmd --reload--refresh firewall status
vim /etc/httpd/conf/httpd.conf write http protocol (permanent effective)
Content: Enter /ServerName to find a separate line
Add a new server name. (0.0.0.0: 80, there is no interval, and all the spaces are wrong)
echo "Hello, nice to meet you"> /var/www/html/index.html Write files in http
liunx does not support typing in Chinese, so it needs to be enclosed in English "".
ip a Check the IP address, you can see the IP address of ens160, this is the IP address of your host to access the webpage you created.
systemctl restart httpd—The firewall allows the httpd service to pass. Now
you can open the browser by yourself and search for your own IP address.