所以我不能让我的Web服务器与SSL正常工作。我已经搜索了4个小时,试图让它起作用,但我没有运气。SSL与主要域名不工作,但子域名做
假设我的域名是example.com。
我有一个主站点https://example.com然后我有4个子域1.example,2.example,3.example和4.example。
现在的事情是,我可以访问所有子域就好了,但是当我尝试访问主域时,它说它无法连接到该网站。我究竟做错了什么 ??。
在Ubuntu 16.04上使用apache 2.4.20稳定。
下面是使用了virtualhosts配置IM:
<VirtualHost *:443>
ServerAdmin [email protected]
LoadModule headers_module modules/mod_headers.so
DocumentRoot /var/www/example.com
<Directory /var/www/example.com>
Options FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
RedirectMatch 404 \.token$
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/certs/cert
SSLCertificateKeyFile /etc/apache2/certs/key
ServerName www.example.com
ServerAdmin [email protected]
LoadModule headers_module modules/mod_headers.so
DocumentRoot /var/www/1.example.com
<Directory /var/www/1.example.com>
Options FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
RedirectMatch 404 \.token$
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/certs/cert
SSLCertificateKeyFile /etc/apache2/certs/key
ServerName www.1.example.com
什么是确切的错误信息? – Tom