Alibaba Cloud Simple Application Server provides Windows Server OS images and mainstream Linux OS images. You can use these images to create a clean, safe, and stable runtime environment. This topic describes how to configure Apache with ease. In this topic, a CentOS 7.6 OS image is used.
For more information about how to deploy development environments and build websites, see Overview of best practices.
Step 1: Create a simple application server
- Log on to the Simple Application Server console.
- In the left-side navigation pane, click Servers.
- In the upper-right corner of the Servers page, click Create Server.
- On the Simple Application Server page, configure parameters to create a simple application server. The following table describes the parameters.
Parameter Example value Description Region China (Hong Kong) Select a region based on the geographical location of your business. The region cannot be changed after the server is created. Proceed with caution.Note Simple application servers deployed in regions outside mainland China such as the China (Hong Kong) and Singapore regions use international bandwidths. High network latency may occur when you access these servers from within mainland China. We recommend that you select a region that is closest to the geographical location of your intended users for higher access speeds. For more information, see Regions and network connectivity. Image
- Type: OS Image
- OS: CentOS
- Version: 7.6
Select a tab and then select an image.
- Apps Image: shows application images. Application images contain application environments and allow you to deploy development environments or build websites with ease.
- OS Image: shows OS images. OS images contain only OS. You can install applications on the OS based on your business requirements.
- Custom Images: shows custom images. Custom images are created from snapshots of simple application servers. You can use a custom image to create simple application servers that have the same configurations. For more information, see Overview of custom images.
Instance Plan $3.5/mo Select a plan based on your business requirements. You are charged additional fees for outbound data transfer to the Internet beyond the plan. For more information about billing, see Billable items and Quota and billing of data transfers. Data Disk 0 GB Optional. To have more storage space on the simple application server, you can create and attach a data disk of the specified size. Subscription Time 1 Month Select a subscription period for the simple application server. You can select Auto-renewal to enable the auto-renewal feature. Quantity 1 Specify the number of simple application servers that you want to create. The default value is 1. You can create up to 20 simple application servers.
- Click Buy Now.
- On the Confirm Order page, verify the order information.
- In the Terms of Service section, read the General Terms and End User License and select I have read and agree to General Terms, End User License.
- Click Pay and follow the on-screen instructions to make a payment. After the payment is made, go back to the Simple Application Server console. On the Servers page, find the server that you created. After the state of the simple application server changes from Initializing to Running, click the server card to view the server details.
Step 2: Log on to the simple application server
Log on to the Linux server. For more information, see Connect to a Linux server.
rootuser. This helps you configure applications in subsequent operations.
sudo su root
Step 3: Configure Apache
- Run the following command to install Apache:
yum install -y httpd
- Run the following commands in sequence to start Apache and make Apache start at boot
systemctl start httpd
Make Apache to start at boot time:
systemctl enable httpd
- Run the following command to check the status of Apache:
systemctl status httpdIf a command output similar to the following one is returned, Apache is running normally.
- On your computer, access
<The public IP address of the simple application server>by using a browser to check whether you can go to the Apache HTTP server test page.To obtain the public IP address of the simple application server, perform the following operations:
The following figure shows the Apache HTTP server test page.
- Go back to the Simple Application Server console.
- On the Servers page, click the server to go to the Overview page.
- In the Server Information section, view the public IP address.
Step 4: (Optional) Bind and resolve a domain name
The security of your server is compromised if you use the public IP address of the server to access websites. To ensure server security, we recommend that you access websites by using a domain name. If you have registered or want to register a domain name, perform the following operations to bind and resolve the domain name:
- Register a domain name. For more information, see Register a generic domain nameHow to register an Alibaba Cloud domain name. If you have registered a domain name, skip this step.
Domain name example:
- If the website to which the domain name points is hosted on a server within a Chinese mainland region, you must apply for an ICP filing for the domain name.
- Optional: Resolve the domain name and make it point to the public IP address of the server.
- If your domain name is registered with Alibaba Cloud, skip this step. After the domain name is bound, the system resolves the domain name.
- If your domain name is not registered with Alibaba Cloud or resolved by Alibaba Cloud DNS, you can add the domain name for Alibaba Cloud DNS to resolve it. For more information, see Domain Management. You can also contact the domain name service provider, create an A record for the domain name that points to the IP address of the WordPress server, and then bind the domain name.
- Go back to the details page of the WordPress server. In the left-side navigation pane, choose .
- Click Add Domain Name.
- Enter a domain name and click OK. After the domain name is bound, the system checks whether the domain name is resolved.
- If the domain name is registered with Alibaba Cloud or resolved by Alibaba Cloud DNS, click OK. The domain name is bound.
- If the domain name is not registered with Alibaba Cloud or resolved by Alibaba Cloud DNS, the domain name remains in the Unresolved state after it is bound. You can have the domain name resolved based on the on-screen instructions in the Simple Application Server console.