Centos8 uses Apache httpd2.4.37 to install the web server

Time:2021-2-23

Step 1: Yum install httpd – y # install httpd service

 

Step 2: systemctl start httpd

 

Step 3: systemctl enable httpd # set httpd service to boot

 

Step 4: firewall CMD — zone = public — add port = 80 / TCP — permanent ᦇ open port 80 of the firewall and make it permanent, and return the meaning of success setting. (- permanent is permanent and will be invalid after restart without this parameter)

 

 

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

 

 

Step 6: firewall CMD — zone = public — Query port = 80 / TCP # check whether port 80 is open, return yes, open successfully, return no, not open (no will be returned if the firewall is not restarted after setting)

 

Step 7: copy the source file 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 change the name to the HTML directory index.html Default home page file.

 

 

 

 

Step 8: the browser enters the local IP address to test the domain name. You need to apply for the domain name first, then do the domain name resolution, and use it after binding the public IP.

Recommended Today

Background management system menu management module

1 menu management page design 1.1 business design Menu management, also known as resource management, is the external manifestation of system resources. This module is mainly to add, modify, query and delete the menu. CREATE TABLE `sys_menus` ( `id` int(11) NOT NULL AUTO_INCREMENT, `Name ` varchar (50) default null comment ‘resource name’, `URL ` varchar […]