我已在我的网络服务器上安装了SSL证书,并启用了使用certbot将所有http请求重定向到https。到目前为止,当我尝试打开www.example.com而不是example.com时,这种方法有效。只是为了记录我用example.com改变了我的domain.com。我检查了我的error.log
和curl https://example.com
curl: (60) Issuer certificate is invalid.
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
,当我尝试在浏览器中打开example.com时,所有这些都没有显示任何新条目。
-bash-4.2$ hostname
example
-bash-4.2$ hostname -f
example.com
当我使用www.example.com执行相同的curl命令时,我进入了我的网站。我正在使用
/etc/sysconfig/network
cat /etc/httpd/sites-available/example.conf
<VirtualHost *:80>
ServerName www.example.com
ServerAlias example.com
DocumentRoot /var/www/html
ErrorLog /var/www/html/error.log
CustomLog /var/www/html/requests.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.example.com [OR]
RewriteCond %{SERVER_NAME} =example.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
</VirtualHost>
中的我的主机名就是示例。我也在使用vhost文件:
/etc/httpd/sites-available/*.conf
在httpd.conf中我设置了从2017-03-15 14:10:39 501 ( INFO): Validating that the system hostname ('example') is a FQDN...
2017-03-15 14:10:39 507 (ERROR):
2017-03-15 14:10:39 508 (ERROR): ********************* ERROR *********************
2017-03-15 14:10:39 509 (ERROR):
2017-03-15 14:10:39 510 (ERROR): Your hostname (example) is invalid, and must be
2017-03-15 14:10:39 511 (ERROR): set to a fully qualified domain name before installing cPanel.
2017-03-15 14:10:39 512 (ERROR):
2017-03-15 14:10:39 513 (ERROR): A fully qualified domain name must contain two dots, and consists of two parts: the hostname and the domain name.
2017-03-15 14:10:39 514 (ERROR): You can update your hostname by running `hostname your-hostname.example.com`, then re-running the installer.
2017-03-15 14:10:39 516 (ERROR): ********************* ERROR *********************
2017-03-15 14:10:39 517 (FATAL): Exiting...
Removing /root/installer.lock.
另一个问题是,当我尝试安装Cpanel时,它会给我以下错误:
{{1}}