Build a local Web server with Centos8
1 Overview
System centos8, using httpd to build a local web server.
2 install httpdsudo yum install-y httpd3 startup service service httpd start4 setup boot
First check to see if boot is set up:
Systemctl list-unit-files | grep httpd
If not, set:
Chkconfig httpd on
Reconfirm:
Systemctl list-unit-files | grep httpd
5 access
Then enter the intranet ip address in the browser (the intranet ip can be viewed through ifconfig). If the following page appears, it is successful.
6 modify the default home page
The default site root is located under / var/www/html and can be modified by modifying / etc/httpd/conf/httpd.conf. Here is just to modify the home page. Create an index.html in / var/www/html:
Cd / var/www/htmlsudo vim index.html
Just enter a little bit and refresh it in the browser.