我是服务器方面的新手。在 Azure 上,我运行基于 Ubuntu 14 的 VirtualMachnine。我安装了 apache2,一切运行正常。
现在我需要添加 SSL 证书。因此,我在 default-ssl.conf 中写入:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName mydomainname.com
ServerAlias www.mydomainname.com
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/mydomainname.crt
SSLCertificateKeyFile /etc/ssl/mydomainname.key
<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>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
在 laravel.conf 上我有:
<VirtualHost *:80>
ServerName mydomainname.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/public
<Directory /var/www/html/public>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
现在我在 portf.conf 中有:
Listen 80
<IfModule ssl_module>
Listen 443
</IfModule>
当我尝试输入地址时出现错误https:// :
[Tue May 10 13:52:22.215535 2016] [mpm_prefork:notice] [pid 4063] AH00169: caught SIGTERM, shutting down
[Tue May 10 13:52:23.304933 2016] [mpm_prefork:notice] [pid 4217] AH00163: Apache/2.4.7 (Ubuntu) mod_gnutls/0.5.10 OpenSSL/1.0.1f configured -- resuming normal operations
[Tue May 10 13:52:23.304992 2016] [core:notice] [pid 4217] AH00094: Command line: '/usr/sbin/apache2'
4天了,我还是无法解决这个问题。请帮忙。
这里有什么问题?