我有https Node.js表示具有有效证书的服务器。我正在my_server_ip:8443上运行此服务器,我需要将其设为https://example.com(example.com:443)。
我的app.js
var privateKey = fs.readFileSync('/home/example.com/ssl.key', 'utf8');
var certificate = fs.readFileSync('/home/example.com/ssl.cert', 'utf8');
var credentials = {key: privateKey, cert: certificate};
var server = https.createServer(credentials, app);
我的apache conf文件:
<VirtualHost *:443>
SuexecUserGroup #1003 #1004
ServerName example.com
ServerAlias www.example.com
DocumentRoot /home/example.com/public_html
ErrorLog /var/log/virtualmin/example.com_error_log
CustomLog /var/log/virtualmin/example.com_access_log combined
SSLEngine on
SSLCertificateFile /home/example.com/ssl.cert
SSLCertificateKeyFile /home/example.com/ssl.key
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
ProxyPass https://localhost:8443/
ProxyPassReverse https://localhost:8443/
</Location>
</VirtualHost>
时,我收到 500内部服务器错误
编辑:我看到问题可能在哪里。出于某种原因,Apache调查*:80配置而不是*:443配置。为什么?