Name | Description |
Lighthouse instance's public IP address | Instance IP address used to connect a local computer to the instance. |
Username | The username used to log in to the Lighthouse instance, such as `root`. |
Password or SSH key | The password matching the username used to log in to the Lighthouse instance, or the bound SSH key. |
cloud.tencent.com
as an example here) to a local directory.
After decompression, you can get the relevant certificate files, including the Apache folder and CSR file:1_root_bundle.crt
: Certificate file2_cloud.tencent.com.crt
: Certificate file3_cloud.tencent.com.key
: Private key filecloud.tencent.com.csr
filessl
folder.cd /usr/local/lighthouse/softwares/apache
sudo mkdir ssl
1_root_bundle.crt
, 2_cloud.tencent.com.crt
, and 3_cloud.tencent.com.key
files from the local directory to the created /usr/local/lighthouse/softwares/apache/ssl
directory. For more information, see Uploading Local Files to Lighthouse.httpd.conf
configuration file.sudo vim /usr/local/lighthouse/softwares/apache/conf/httpd.conf
#
in #LoadModule ssl_module modules/mod_ssl.so
.#
in #LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
.localhost
in ServerName localhost
with the certificate name. A modified sample is as shown below:ServerName cloud.tencent.com
#
in #Include conf/extra/httpd-ssl.conf
.httpd-ssl.conf
configuration file.sudo vim /usr/local/lighthouse/softwares/apache/conf/extra/httpd-ssl.conf
<VirtualHost _default_:443>
:www.example.com:443
in ServerName www.example.com:443
with the certificate name. A modified sample is as shown below:ServerName cloud.tencent.com
SSLCertificateFile "/usr/local/lighthouse/softwares/apache/ssl/2_cloud.tencent.com.crt"SSLCertificateKeyFile "/usr/local/lighthouse/softwares/apache/ssl/3_cloud.tencent.com.key"SSLCertificateChainFile "/usr/local/lighthouse/softwares/apache/ssl/1_root_bundle.crt"
<Directory "/usr/local/lighthouse/softwares/apache/htdocs">Options Indexes FollowSymLinksAllowOverride allRequire all granted</Directory>
sudo /usr/local/lighthouse/softwares/apache/bin/httpd -k restart
https://cloud.tencent.com
for access as shown below:
httpd.conf
configuration file .sudo vim /usr/local/lighthouse/softwares/apache/conf/httpd.conf
#
in #LoadModule rewrite_module modules/mod_rewrite.so
.RewriteEngine onRewriteCond %{SERVER_PORT} !^443$RewriteRule ^(.*)?$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
sudo /usr/local/lighthouse/softwares/apache/bin/httpd -k restart
http://cloud.tencent.com
to redirect to the HTTPS page.
Was this page helpful?