Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to build a local Web server by Centos8

Shulou Source: shulou.com Published: 2022-05-31 11:26:41 11月16日 Update

This article mainly introduces the relevant knowledge of Centos8 how to build a local Web server, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this Centos8 article on how to build a local Web server. Let's take a look.

1 Overview

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

2 install httpd

Sudo yum install-y httpd

3 start the service

Service httpd start

4 set up boot 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.

This is the end of the article on "how to build a local Web server in Centos8". Thank you for reading! I believe you all have a certain understanding of "how to build a local Web server in Centos8". If you want to learn more, you are welcome to follow the industry information channel.

Tags: Service server content knowledge home page available through browser article browse input success value just address easy to operate article easy to understand more root directory see Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker MySQL Apple vpn Xiaomi