All Products
Search
Document Center

Simple Application Server:Install an SSL certificate on a WordPress environment (Linux)

Last Updated:Jun 20, 2026

If your Simple Application Server has a domain name attached, configure HTTPS encryption for the domain. This changes your data transmission protocol from HTTP to HTTPS at low cost, enabling website identity verification and encrypted data transmission to prevent data tampering or information leakage during transit. This topic uses a Simple Application Server running WordPress 5.8 as an example to show how to install an SSL certificate on your server and enable HTTPS encryption.

Note

If your Simple Application Server was created using the WordPress 6.7.1 application image, you can enable HTTPS encryption with one click in the console. For more information, see Enable HTTPS with one click.

Background information

After you purchase and request a certificate through Certificate Management Service (formerly SSL Certificate) and deploy it to your web server, your web service transmits data over the HTTPS protocol. HTTPS establishes an SSL-encrypted channel between the client browser and your web server, enabling strong one-way encryption to prevent data leakage or tampering during transmission. HTTPS encryption is required for mobile apps, mini programs, code programs, controls, and other applications to be published in app stores or ecosystems. HTTPS encryption offers the following benefits:

  • Security compliance: Meets requirements of app stores or application ecosystems.

  • Encrypts network data: Encrypts communication between website users and your site, preventing data hijacking, tampering, and eavesdropping to ensure secure data transmission.

  • Improves website security: Helps avoid phishing incidents. Browsers display security indicators when users visit your site, increasing trust, traffic, and search rankings.

Prerequisites

Step 1: Purchase an SSL certificate

Purchase a certificate

  1. Go to the Certificate Service purchase page.

  2. Select the specifications for your certificate.

    Parameter

    Description

    Example

    Certificate Type

    Select the type of domain to which the SSL certificate will be bound:

    • Single Domain: An SSL certificate that is bound to a single domain.

    • Wildcard Domain: Secures multiple subdomains at the same level, eliminating the need to purchase and install a separate certificate for each subdomain.

      The following rules apply to wildcard domain matching:

      • The certificate matches only subdomains at the same level. For example, a certificate for *.aliyundoc.com can match demo.aliyundoc.com and learn.aliyundoc.com, but cannot match guide.demo.aliyundoc.com or developer.demo.aliyundoc.com.

      • You can apply for a certificate for only one wildcard domain. To include multiple wildcard domains in one certificate, you can combine multiple certificates of the same brand and type. For more information, see Combine certificate applications.

    • Multiple Domains: An SSL certificate that is bound to multiple single domains. You can use a single certificate to secure up to five domains.

    Note

    Alibaba Cloud provides a free domain name when you purchase a qualifying commercial certificate. For more information, see Purchase a commercial certificate.

    Single Domain

    Brand

    Select the certificate brand (the CA that issues the certificate).

    For more information about certificate brands, see SSL certificate selection guide.

    Digicert

    Certificate Specifications

    Select the required certificate type.

    For more information about different certificate types, see SSL certificate selection guide.

    DV SSL

    Domain Names

    This parameter is required only when you select Multiple Domains. Select the number of single domains to bind to the SSL certificate.

    1

    Quantity

    The number of SSL certificates to purchase. This value is fixed at 1. To purchase certificates for multiple consecutive years, set the Service Duration. For example, setting Service Duration to 2 Years provides two separate one-year certificates.

    1

    Service Duration

    The duration of the SSL certificate service. Options:

    • 1 Year: Provides a one-year SSL certificate service. The certificate is valid for one year and must be manually renewed upon expiration.

    • 2 Years: Provides a two-year service that includes two one-year certificates and one year of the certificate hosting service.

      For more information about certificate hosting, see What is certificate hosting?.

    • 3 years: Provides a three-year service that includes three one-year certificates and two years of the certificate hosting service.

    1 Year

  3. Click Buy Now and complete the payment.

Submit a certificate request

  1. Log in to the Certificate Management Service console.

  2. In the navigation pane on the left, choose Certificate Management > SSL Certificate Management.

  3. On the Commercial Certificate tab, find the certificate you purchased and click Apply for Certificate in the Actions column.

  4. In the Apply for Certificate panel, configure the parameters, select the Quick Issue checkbox, and then click Submit.

    Parameter

    Description and example

    Certificate Type

    Single Domain

    Certificate Specifications

    digicert DV

    Domain Name

    The domain name to be secured by the certificate. This domain must be the one bound to your Simple Application Server instance. Example: aliyundoc.com

    Validity Period (Years)

    1

    Quick Issue

    Domain Verification Mode

    • If your domain uses Alibaba Cloud DNS under the same account, Certificate Management Service automatically selects Automatic DNS Verification. This method cannot be changed. The system completes verification automatically after you submit the application, so you only need to wait for the certificate to be issued.

    • If the domain name does not use Alibaba Cloud DNS or is managed by a different Alibaba Cloud account, you can select one of the following methods to verify domain ownership:

      • Manual DNS Verification: Requires you to manually add a TXT record in your DNS provider's console to verify domain ownership.

      • File Verification: Download a dedicated verification file from the Certificate Management Service console and upload it to the required verification directory on your web server.

    Contact

    From the drop-down list, select a contact. If no contact is available, click Create Contact to create one.

    Make sure that the contact information is accurate and valid.

    Region

    Select your city or region.

    Encryption Algorithm

    The encryption algorithm of the SSL certificate. The default value is RSA and cannot be changed. RSA is a widely used asymmetric encryption algorithm that provides good compatibility.

    CSR Generation

    A Certificate Signing Request (CSR) is a file that contains server and company information and is submitted to a CA for review.

    Select System Generated. Certificate Management Service automatically generates a CSR file by using the specified Encryption Algorithm.

  5. If the Domain Verification Mode is Automatic DNS Verification, the system automatically completes the DNS verification. You only need to wait for the certificate to be issued. If the Domain Verification Mode is set to Manual DNS Verification or File Verification, you must follow the prompts in Verify Information to complete the domain ownership verification. For more information, see Domain ownership verification.

    After you submit the certificate application, the CA typically reviews the application and issues the certificate within approximately 30 minutes. After the SSL certificate is issued, its Status changes to Issued.

Step 2: Configure the SSL certificate

After issuance, the certificate status changes to Issued. Deploy the SSL certificate to your server and configure it. For more information about certificate deployment and installation, see Deploy an SSL certificate.

  1. Upload and deploy the SSL certificate.

    1. In the navigation pane on the left, choose Deployment Management > Deployment to Cloud Servers.

    2. On the Deployment to Cloud Servers page, click Create Task.

      1. On the Basic Configuration page, enter a custom task name and click Next.

      2. On the Select Certificate page, choose the certificate type and associate the SSL certificate with your cloud server. Click Next.

      3. On the Select Resource page, choose the appropriate cloud server and resources. Click Next.

        • The system automatically identifies and retrieves all eligible cloud server instances under your Alibaba Cloud account (those running web applications). If resources do not appear, verify that your cloud server runs a web application such as Nginx or Apache.

        • If a certificate was previously deployed to an instance, its name appears.

      4. On the Deployment Configuration page, deploy the certificate to your cloud server as shown in the following table. Click OK.

        Important

        If the certificate configuration directory does not exist on your server, the system creates it automatically. The path configured in the console must match the certificate file path in your cloud server's web application configuration.

        Configuration item

        Description

        Configuration example

        Certificate Path

        Set the absolute path for the certificate file on your cloud server.

        /data/cert/certpublic.crt

        Private Key Path

        Set the absolute path for the private key file on your cloud server.

        /data/cert/cert.key

        Certificate Chain Path

        Set the absolute path for the certificate chain file on your cloud server.

        /data/cert/certchain.crt

        Reload Command

        After deploying the certificate, restart your web application or reload its configuration to activate the certificate. Enter the restart or reload command here.

        Important

        Running these commands might cause service startup failures. If this occurs, operate directly on your cloud server.

        Not required.

      5. In the confirmation dialog box, click OK.

  2. Configure the SSL certificate.

    1. Remotely connect to your Simple Application Server. For more information, see Remotely connect to a Linux server.

    2. Run the following command to edit the vhost.conf configuration file.

      Note

      This example assumes Apache is installed by default in your WordPress environment. Configuration file paths and names may vary—adjust according to your actual environment.

      sudo vim /etc/httpd/conf.d/vhost.conf
    3. Press i to enter edit mode.

    4. Add the following code to the configuration file.

      Before using the example code, update these configuration items:

      • ServerName: Your domain name, for example: example.com.

      • DocumentRoot: Application directory, for example: /data/wwwroot/wordpress.

      • Directory: Application directory, for example: /data/wwwroot/wordpress.

      • SSLCertificateFile: Public key file path, for example: /data/cert/certpublic.crt.

      • SSLCertificateKeyFile: Private key file path, for example: /data/cert/cert.key.

      • SSLCertificateChainFile: Certificate chain file path, for example: /data/cert/certchain.crt.

      Important

      Incorrect certificate file paths prevent HTTPS access.

      Example configuration:

      <VirtualHost *:443>
      # Bind domain to server
      ServerName  example.com
      DocumentRoot "/data/wwwroot/wordpress"
      #ErrorLog "logs/example.com-error_log"
      #CustomLog "logs/example.com-access_log" common
      <Directory "/data/wwwroot/wordpress">
      Options Indexes FollowSymlinks
      AllowOverride All
      Require all granted
      </Directory>
      SSLEngine on
      # Configure SSL certificate. Path must match deployment settings.
      SSLCertificateFile  /data/cert/certpublic.crt
      SSLCertificateKeyFile  /data/cert/cert.key
      SSLCertificateChainFile  /data/cert/certchain.crt
      </VirtualHost>
    5. (Conditionally required) If you want to enable automatic redirection from HTTP requests to HTTPS, you also need to add configuration in <VirtualHost *:80>

      Add the following configuration information to the code block.

      #----------HTTP for WordPress Start--------
      <VirtualHost *:80>
          ServerName example.com
          #ServerAlias example.com
          DocumentRoot "/data/wwwroot/wordpress"
          ErrorLog "logs/wordpress-error_log"
          CustomLog "logs/wordpress-access_log" common
          RewriteEngine on
          RewriteCond %{SERVER_PORT} !^443$
          RewriteRule ^(.*)?$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
          <Directory "/data/wwwroot/wordpress">
              Options Indexes FollowSymlinks
              AllowOverride All
              Require all granted
          </Directory>
      </VirtualHost>
      
      #----------HTTP for WordPress End--------
    6. After editing, press Esc, type :wq!, and press Enter to save and exit.

    7. Run the following command to restart the service.

      sudo systemctl restart httpd
    8. Run the following command to restart the database.

      sudo service mysqld restart

Step 3: Verify the SSL certificate

  1. Configure the HTTPS domain in the WordPress admin panel.

    1. Log on to the WordPress admin panel.

      For instructions on obtaining the admin panel URL, username, and password, see Quickly build a website using a WordPress application image.

    2. In the navigation pane on the left, choose Settings > General.

    3. In WordPress Address (URL) and Site Address (URL), enter your attached and resolved domain name. This example uses https://example.com.

    4. Click Save Changes.

      Note

      After changing WordPress Address (URL) and Site Address (URL), the admin login URL becomes https://example.com/wp-login.php. Replace example.com with your actual domain.

  2. Access https://your Simple Application Server's domain in a browser.

    • If a lock icon appears in the browser address bar, the SSL certificate is installed successfully.

    • If your site cannot be accessed via HTTPS, troubleshoot as follows:

      • Confirm that port 443 on your Simple Application Server is open and not blocked by other tools. For instructions on allowing port 443, see Manage firewall.

      • Verify ICP filing status. If your domain resolves to a server in the Chinese mainland, ensure ICP filing is complete. For more information, see What is ICP filing?.

      • Check certificate path configuration. Ensure the uploaded certificate path matches the configured path. For more information, see Configure SSL certificate.

References

Different server types support different SSL certificate formats. Choose the appropriate SSL certificate based on your server type. For more information, see Deploy an SSL certificate.