所以我不能讓我的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