所以我有一个运行apache2 v2.4.7的数字海洋ubuntu14.04服务器。我买了一个NamecheapURL域,并将它的.me框架指向DO服务器的IP。到目前为止,一切都正常。然后我注册了一个免费的StartSSL证书(注册到.me域名),并通过this tutorial将其添加到服务器,我唯一没有做的事情就是将VirtualHost 80和443保存在同一个文件中。我将443放在它自己的default-ssl.conf文件中。
现在,如果我转到http://123.123.123.123或http://www.myexample.me,它可以正常工作。如果我转到https://123.123.123.123 (端口443SSL virtualhost),它可以工作,但它会警告我,因为证书已注册到www.myexample.me。
最后,如果我转到https://www.myexample.me,它什么也不做,除了chrome javascript控制台中的以下内容
GET https://www.myexample.me/ net::ERR_CONNECTION_REFUSED这是我的default-ssl.conf文件
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName myexample.me:443
DocumentRoot /var/www/html
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
SSLCertificateFile /etc/apache2/ssl/ssl.crt
SSLCertificateKeyFile /etc/apache2/ssl/private.key
SSLCertificateChainFile /etc/apache2/ssl/sub.class1.server.ca.pem
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
</IfModule>在添加证书后重新加载apache时。我收到了这个错误。
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message因此,我在apache2.conf文件的底部添加了Servername myexample.me,这似乎可以抑制错误。
任何指导都是值得感谢的。如果我错过了发布任何信息,请让我知道。
发布于 2015-03-23 03:25:42
所以我能够修复它,相当愚蠢的错误,但如果我会把它贴出来,以防其他人也犯同样的错误。
在namecheap的URLRedirect设置中,或者您可能使用的任何提供商中,我的URL重定向设置都被设置为URLFrame。但它们应该设置为A(地址)。
感谢所有帮助我的人。
https://stackoverflow.com/questions/29041334
复制相似问题