![如何为端口 8080 添加 SSL?在 apache2 ubuntu 20.04 中](https://linux22.com/image/1072430/%E5%A6%82%E4%BD%95%E4%B8%BA%E7%AB%AF%E5%8F%A3%208080%20%E6%B7%BB%E5%8A%A0%20SSL%EF%BC%9F%E5%9C%A8%20apache2%20ubuntu%2020.04%20%E4%B8%AD.png)
我试图将我的 SSL 证书添加到端口 8080,但是当我通过 https 进入时,它告诉我这个错误:ERR_SSL_PROTOCOL_ERROR
这是我的subdomain_maindomain.onlin.conf:
<VirtualHost *:80>
ServerName panel.example.online
ServerAlias www.exmaple.online
</VirtualHost>
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName panel.example.online
ServerAlias www.panel.example.online
DocumentRoot /var/www/pufferpanel
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/example.online/example.online.crt
SSLCertificateKeyFile /etc/ssl/example.online/example.key
SSLCertificateChainFile /etc/ssl/example.online/example.online.ca-bundle
</VirtualHost>
答案1
改变路线
<VirtualHost *:443>
向
<VirtualHost *:443 *:8080>