Configuring HTTPS for the Linux One-Click Installation Package

2026-05-09 16:46:00
Sanplex Content
277
Last edited by WANG JING on 2026-05-09 16:46:00
Share links
Summary : This guide explains how to configure HTTPS for the Sanplex Linux one-click installation package, including installing OpenSSL, generating a self-signed certificate, modifying Apache configurations, and updating firewall rules.

Example System: CentOS 7.6

1. Install openssl and openssl-devel via yum

Bash

# Check if they are already installed
rpm -qa | grep openssl
rpm -qa | grep openssl-devel
# Install if they are missing
yum install openssl openssl-devel -y 

2. Generate a Self-Signed Certificate

Note: When executing step 2.5 (Create a CSR), you will be prompted to enter your Country, State/Province, Locality, Organization, Organizational Unit, Common Name, Email, and Password sequentially. The Common Name must match your domain name. Since the password requirement has been bypassed in these steps, simply press Enter when prompted for a password.

Bash

# 2.1 Create the certificate directory
mkdir /opt/zbox/etc/apache/cert/
# 2.2 Navigate to the directory
cd /opt/zbox/etc/apache/cert/
# 2.3 Create a passphrase-protected key
openssl genrsa -des3 -passout pass:x -out mysite.pass.key 2048
# 2.4 Remove the passphrase from the key
openssl rsa -passin pass:x -in mysite.pass.key -out mysite.key
# 2.5 Create a Certificate Signing Request (CSR)
openssl req -new -key mysite.key -out mysite.csr
# 2.6 Generate the certificate using the CSR and the key
openssl x509 -req -days 365 -in mysite.csr -signkey mysite.key -out mysite.crt 

3. Modify the Configuration File

Open the /opt/zbox/etc/apache/httpd.conf file and append the following configuration:

Apache

Listen 443 https
SSLPassPhraseDialog builtin
SSLRandomSeed startup file:/dev/urandom  256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin
<VirtualHost _default_:443>
  DocumentRoot "/opt/zbox/app/htdocs"
  Servername mysite:443
  ErrorLog /opt/zbox/logs/ssl_error_log
  TransferLog /opt/zbox/logs/ssl_access_log
  LogLevel warn
  SSLEngine on
  SSLProtocol all -SSLv2 -SSLv3
  SSLCipherSuite HIGH:3DES:!aNULL:!MD5:!SEED:!IDEA
  SSLCertificateFile /opt/zbox/etc/apache/cert/mysite.crt
  SSLCertificateKeyFile /opt/zbox/etc/apache/cert/mysite.key
</VirtualHost> 

4. Open Port 443 in the Firewall

Bash

firewall-cmd --add-port=443/tcp --permanent
firewall-cmd --reload 

5. Restart the Service

Bash

/opt/zbox/zbox restart 

Finally, verify the configuration by accessing your site via HTTPS: https://mysite

Write a Comment
Comment will be posted after it is reviewed.