Detailed steps to install web server using Apache httpd2.4.37 on centos8

Detailed steps to install web server using Apache httpd2.4.37 on centos8

Step 1: yum install httpd -y #Install httpd service

Step 2: systemctl start httpd #Start the httpd service

Step 3: systemctl enable httpd #Set the httpd service to start at boot

Step 4: firewall-cmd --zone=public --add-port=80/tcp --permanent #Open port 80 of the firewall and make it permanent. The return value success indicates that the setting is successful. (-permanent means permanent effect, and will become invalid after restart without this parameter)

Step 5: systemctl restart firewalld.service #Restart the firewall to make the previous settings take effect

Step 6: firewall-cmd --zone=public --query-port=80/tcp #Check whether port 80 is open. If yes is returned, it is open successfully. If no is returned, it is not open (if the setting is completed and the firewall is not restarted, it will return no)

Step 7: Copy the source files of the website to the /var/www/html directory. Or delete the /var/www/html directory, and then copy the source file directory to the /var/www directory and rename it to html. The html directory must contain the index.html default homepage file.

Step 8: Enter the local IP address in the browser to test. #For domain names, you need to apply for a domain name first, then do domain name resolution, and bind the public IP before use.

Summarize

This is the end of this article about how to install a web server on centos8 using Apache httpd2.4.37. For more information about how to install a web server on centos8 using Apache httpd2.4.37, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Implementation steps for building a local web server on Centos8
  • CentOS 7.2 configuration Apache service httpd (Part 2)
  • CentOS 7.2 configuration Apache service httpd (Part 1)
  • Detailed explanation of the main configuration file httpd.conf of the Apache server
  • Apache's httpd.conf Chinese detailed explanation
  • APACHE configuration file Chinese version httpd.conf FOR Apache 2.2.13

<<:  Take you to understand the event scheduler EVENT in MySQL

>>:  Detailed explanation of Jquery datagrid query

Recommend

Web interview Vue custom components and calling methods

Import: Due to project requirements, we will enca...

How to block and prohibit web crawlers in Nginx server

Every website usually encounters many non-search ...

How to install Windows Server 2008 R2 on Dell R720 server

Note: All pictures in this article are collected ...

JavaScript to achieve floor effect

This article shares the specific code of JavaScri...

Mycli is a must-have tool for MySQL command line enthusiasts

mycli MyCLI is a command line interface for MySQL...

Solution to overflow:hidden failure in CSS

Cause of failure Today, when I was writing a caro...

Example of downloading files with vue+django

Table of contents 1. Overview 2. Django Project 3...

Docker time zone issue and data migration issue

Latest solution: -v /usr/share/zoneinfo/Asia/Shan...

MySQL slow query optimization: the advantages of limit from theory and practice

Many times, we expect the query result to be at m...

About the role of meta in HTML (collected and sorted from the Internet)

W3Cschool explains it this way The <meta> el...

Detailed explanation of mysql record time-consuming sql example

mysql records time-consuming sql MySQL can record...

WeChat applet realizes linkage menu

Recently, in order to realize the course design, ...

Detailed explanation of PHP+nginx service 500 502 error troubleshooting ideas

Overview When a 500 or 502 error occurs during ac...

Implementation code for infinite scrolling with n container elements

Scenario How to correctly render lists up to 1000...

How to configure https for nginx in docker

Websites without https support will gradually be ...