使用 Godaddy 子網域憑證設定 Amazon Linux 2 SSL

使用 Godaddy 子網域憑證設定 Amazon Linux 2 SSL

我在 Amazon Linux 2 實例上有兩個網站 site1.mydomain.com 和 site2.mydomain.com。我使用了負載平衡器和帶有子網域 site1 和 site2 的 godaddy 證書,但出於成本原因,我想擺脫負載平衡器並直接在電腦上安裝證書。我成功了..但現在網站只顯示 Apache 樣板頁面..而不顯示我的 var/www/html/site1 和 site2 資料夾中的內容。我必須在 httpd.conf 檔案中寫什麼或我必須在哪裡擺弄?

我按照說明在 AWSLinux2 實例上安裝 ssl 憑證..但隨後它不會再顯示我的網站。我的 godaddy 憑證已註冊所有子網域。

我得到例如

[ec2-user@embatek ~]$ apachectl -S
VirtualHost configuration:
*:80                   embatek.com.br (/etc/httpd/conf/httpd.conf:87)
*:433                  embatek.com.br (/etc/httpd/conf/httpd.conf:95)
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex default: dir="/run/httpd/" mechanism=default 
Mutex mpm-accept: using_defaults
Mutex cache-socache: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex watchdog-callback: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex authdigest-client: using_defaults
Mutex lua-ivm-shm: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
PidFile: "/run/httpd/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="apache" id=48 not_used
Group: name="apache" id=48 not_used
[ec2-user@embatek ~]$ 

答案1

*:433 embatek.com.br (/etc/httpd/conf/httpd.conf:95)

這是錯誤的連接埠。 https 的連接埠是 443。

編輯 httpd.conf 的第 95 行以閱讀 <VirtualHost *:443>並重試。

相關內容