Get the App
SLTechnology News&Howtos  ›  Servers  › 

Build a local Web server with Centos8

Shulou Source: shulou.com Published: 2022-06-03 10:14:41 09月21日 Update

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.

Tags: Service home page available through browser browse input server success content just address root directory system website page Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Information Redmi Microsoft MySQL