Implementation steps for building a local web server on Centos8

Implementation steps for building a local web server on Centos8

1 Overview

System centos8, use 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 startup

First check if there is any setting to start at boot:

systemctl list-unit-files | grep httpd 


If not, set:

chkconfig httpd on

Confirm again:

systemctl list-unit-files | grep httpd 

5 Visit

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

6 Modify the default homepage

The default website root directory is located in /var/www/html, which can be modified by modifying /etc/httpd/conf/httpd.conf. Here we only modify the homepage. Create an index.html in /var/www/html:

cd /var/www/html
sudo vim index.html

Just enter some content and refresh the browser.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Detailed tutorial on building Gitlab server on CentOS8.1
  • How to build mysql master-slave server on centos7 (graphic tutorial)
  • Detailed explanation of building Nginx website server based on centos7 (including configuration of virtual web host)
  • CentOS 7.2 builds nginx web server to deploy uniapp project
  • Detailed explanation of how to build phalcon environment under nginx server on centos7 system
  • Tutorial on building a master-slave DNS server in Centos7
  • Install and build a server environment of PHP+Apache+MySQL on CentOS
  • A concise tutorial on setting up a PHP server environment on CentOS
  • Centos builds chrony time synchronization server process diagram

<<:  Mysql solves the database N+1 query problem

>>:  How to monitor array changes in JavaScript

Recommend

Detailed explanation on how to install MySQL database on Alibaba Cloud Server

Preface Since I needed to install Zookeeper durin...

Docker starts in Exited state

After docker run, the status is always Exited Sol...

Detailed explanation of two ways to dynamically change CSS styles in react

The first method: dynamically add a class to show...

Define your own ajax function using JavaScript

Since the network requests initiated by native js...

Detailed explanation of nginx request header data reading process

In the previous article, we explained how nginx r...

Causes and solutions to the garbled character set problem in MySQL database

Preface Sometimes when we view database data, we ...

HTML table tag tutorial (32): cell horizontal alignment attribute ALIGN

In the horizontal direction, you can set the cell...

Example code for implementing equal height layout in multiple ways with CSS

The equal height layout described in this article...

Is mysql a relational database?

MySQL is a relational database management system....

How to block and prohibit web crawlers in Nginx server

Every website usually encounters many non-search ...

Superficial Web Design

<br />I have always believed that Yahoo'...

How to modify the initial password of MySQL on MAC

Problem description: I bought a Mac and installed...

How to reference external CSS files and iconfont in WeChat applet wxss

cause The way to import external files into a min...

Solution to ERROR 1366 when entering Chinese in MySQL

The following error occurs when entering Chinese ...

Example code for implementing 3D Rubik's Cube with CSS

Let's make a simple 3D Rubik's Cube today...