- Product Bulletin
- Service Overview
-
User Guide
- Usage Overview
- Selecting HCE as the Public Image When Creating an ECS
- Changing an OS to HCE
- Migrating an OS
- Upgrading HCE and RPM Packages
- Security Updates for HCE
- Obtaining the openEuler Extended Software Packages
- Creating a Docker Image and Starting a Container
- Tools
- Kernel Functions and Interfaces
- xGPU
- Configuring the Repositories and Installing Software for HCE
-
FAQs
- What Do I Do If CentOS Linux Is No Longer Maintained?
- Does Huawei Cloud Have a Migration Solution for CentOS?
- How Do I Install the MLNX Driver?
- How Do I Enable SELinux on an ECS Running HCE?
- How Do I Change the OS Name on the Console After the OS Is Migrated?
- How Are Huawei Cloud EulerOS, EulerOS, and openEuler Different from One Another?
- How Do I Enable WireGuard in Kernel and Install wireguard-tools?
- How Do I Save the User Credential Information for Logging In to Docker Like What Docker CE Does?
- What Is OOM? Why Does OOM Occur?
- How Do I Handle IPVS Errors?
- Why Can't HCE Obtain an IPv6 Address After IPv6 Is Enabled for an ECS?
- How Do I Set Auto Log Using TMOUT?
- Best Practices
- General Reference
Show all
Copied.
Installing Apache
Introduction
Apache HTTP Server (Apache for short) is a free open-source cross-platform web server software developed by the Apache Software Foundation. It can run in most operating systems and is widely used because of its high security. As one of the most popular web server software, Apache offers features such as support for FastCGI and SSL, and integration with Perl. This tutorial describes how you can deploy Apache in HCE 2.0.
Preparations
- Prepare an ECS and assign a public IP address or EIP to the ECS.
- Ensure that inbound security group rules allow traffic to flow to the ECS over port 80.
Procedure
- Install Apache.
- Run the following command to install Apache:
dnf install httpd httpd-devel
After the command is executed, the Apache configuration file is /etc/httpd/conf/httpd.conf.
- Run the following command to check the Apache version:
httpd -v
Information similar to the following is displayed:
[root@localhost system]# httpd -v Server version: Apache/2.4.51 (Unix) Server built: Feb 9 2022 09:00:41
- Run the following command to start Apache:
systemctl start httpd
If active (running) is displayed, Apache is started.
NOTE:
To set Apache to automatically enable upon system boot, run the following commands in sequence:
systemctl enable httpd systemctl daemon-reload
- Run the following command to install Apache:
- Verify Apache.
- Run the following command to create a test page:
echo test > /var/www/html/index.html
- Enter http://<Public IP address> in the address box of the browser. If the following figure is displayed, the deployment is successful.
- Run the following command to create a test page:
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot