Get the App
SLTechnology News&Howtos  ›  Servers  › 

The implementation steps of building a local Web server with Centos8

Shulou Source: shulou.com Published: 2022-06-02 04:10:26 10月01日 Update

1 summarizes

System centos8, using httpd to build a local web server.

2 Install httpd

sudo yum install -y httpd

3 Start of service

service httpd start

4 Settings Boot Start

First check if there are settings to boot:

systemctl list-unit-files | grep httpd

If not, set:

chkconfig httpd on

Just to confirm:

systemctl list-unit-files | grep httpd

5 Visits

Then enter the IP address of the intranet in the browser (the IP address of the intranet can be viewed through ifconfig). If the following page appears, it means success.

6 Changing the default home page

The default root directory is/var/www/html, which can be modified by modifying/etc/httpd/conf/httpd.conf. This is just a modification of the homepage. The requested URL/var/www/html/was not found on this server.

cd /var/www/htmlsudo vim index.html

Just type something and refresh it in your browser.

The above is all the content of this article, I hope to help everyone's study, but also hope that everyone a lot of support.

Tags: Service home page content available through browser browsing input server success just address that is root directory system website page learning help support steps Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL vpn Microsoft Xiaomi Redmi