Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Apache server to build http website

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to use Apache server to build http website". In daily operation, I believe many people have doubts about how to use Apache server to build http website. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to use Apache server to build http website". Next, please follow the editor to study!

Prepare the tool

A host with a Linux system, which uses a CentOS 7.164-bit system

A registered domain name. Www.hellopage.cn is used here.

A pc that can access the network, and the Win7_pro_sp1 used here

Steps

1. Resolve the domain name

Add the resolution to the host ip in the domain name management console, as shown below

2. Apache install and start CentOS system, install httpd

# yum install httpd

3. Configure the Apache environment

# vim / etc/httpd/conf/httpd.conf

Add the following code to the end of the file

Also modify the following part of the file to modify the default home directory

At the same time, don't forget to create this directory, otherwise an error will be reported.

# cd / var/www/html

# mkdir hellopage

Finally restart httpd

# / bin/systemctl start httpd.service

4. Test

1. Open the browser and enter www.hellopage.cn. If the following page appears, it will be established successfully.

Testing 123..

This page is used to test the proper http://www.bbqmw.net/ operation of the Apache HTTP server after it has been installed. If you can read this page it means that this site is working properly. This server is powered by CentOS.

two。 Create a html under the / var/www/html/hellopage/ you just created

# cd / var/www/html/hellopage/

# touch index.html

# vim index.html

Add the following code

God Sacred

Hello world!

3. Log back in to the website www.hellopage.cn

At this point, the study on "how to use Apache server to build http website" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report