Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache (98)已在使用的地址:make_sock:无法绑定到地址[:]:443_Apache_Ssl_Amazon Web Services_Amazon Ec2 - Fatal编程技术网

Apache (98)已在使用的地址:make_sock:无法绑定到地址[:]:443

Apache (98)已在使用的地址:make_sock:无法绑定到地址[:]:443,apache,ssl,amazon-web-services,amazon-ec2,Apache,Ssl,Amazon Web Services,Amazon Ec2,我试图做的是在AmazonEC2实例上引导我的网站,这样我就可以使用HTTPS协议打开。我的网站以前运行过,但警告它没有有效的证书,使用此链接示例,但现在我在尝试访问该网站时收到“网页不可用”提示 请注意,我有: 使用Apache在Linux服务器上为此测试站点安装Drupal 我的EC2实例连接到弹性IP 使用本指南中的步骤: 有效的CA签名Apache证书 安装在/home/ec2用户文件夹中的openssl-1.0.1f文件 使用此链接创建虚拟主机: 下面是在尝试解决HTTPS访问问题时发

我试图做的是在AmazonEC2实例上引导我的网站,这样我就可以使用HTTPS协议打开。我的网站以前运行过,但警告它没有有效的证书,使用此链接示例,但现在我在尝试访问该网站时收到“网页不可用”提示

请注意,我有:

使用Apache在Linux服务器上为此测试站点安装Drupal

我的EC2实例连接到弹性IP

使用本指南中的步骤:

有效的CA签名Apache证书

安装在/home/ec2用户文件夹中的openssl-1.0.1f文件

使用此链接创建虚拟主机:

下面是在尝试解决HTTPS访问问题时发生错误的时间

我试图更改此链接中的ssl.conf文件,看看它是否能解决问题:

我复制了一个新的ssl.conf文件,对旧的SSLCertificateKeyFile、SSLCertificateFile和SSLCertificateChainFile进行了注释。在对前四行代码进行如下编码后,我将复制的、修改过的文件粘贴到目录中:

<VirtualHost 00.00.00.00:443>
  SSLCertificateKeyFile /home/ec2-user/castestingapache/privatekey.pem
  SSLCertificateFile /home/ec2-user/castestingapache/my_site_name_edu.pem 
  SSLCertificateChainFile /home/ec2-user/castestingapache/my_site_name_edu_interm.crt
<VirtualHost 00.00.00.00:443>    #Same as the IP in the ssl.conf#
ServerAdmin ec2-user@ec2-00-00-00-00.compute.amazonaws.com
DocumentRoot /var/www/html
ServerName https://my.site.name.edu
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
# ErrorLog logs/errorlogs
# CustomLog logs/custom
SSLCertificateFile /home/ec2-user/castestingapache/my_site_name_edu.pem 
SSLCertificateKeyFile /home/ec2-user/castestingapache/privatekey.pem
SSLCertificateChainFile /home/ec2-user/castestingapache/my_site_name_edu_interm.crt
# SSLCACertificateFile /etc/httpd/conf/bundle.txt 
SetEnvIf User-Agent “.*MSIE.*” nokeepalive ssl-unclean-shutdown
# CustomLog /usr/local/apache/logs/ssl_request_log \
# “%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \”%r\” %b”
</VirtualHost>
我收到了以下错误消息:

Stopping httpd:                                            [FAILED]
Starting httpd: [Wed May 21 14:44:31 2014] [warn] module ssl_module is already loaded,     skipping
(98)Address already in use: make_sock: could not bind to address [::]:443
                                                       [  OK  ]
我的httpd.conf设置如下:

<VirtualHost 00.00.00.00:443>
  SSLCertificateKeyFile /home/ec2-user/castestingapache/privatekey.pem
  SSLCertificateFile /home/ec2-user/castestingapache/my_site_name_edu.pem 
  SSLCertificateChainFile /home/ec2-user/castestingapache/my_site_name_edu_interm.crt
<VirtualHost 00.00.00.00:443>    #Same as the IP in the ssl.conf#
ServerAdmin ec2-user@ec2-00-00-00-00.compute.amazonaws.com
DocumentRoot /var/www/html
ServerName https://my.site.name.edu
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
# ErrorLog logs/errorlogs
# CustomLog logs/custom
SSLCertificateFile /home/ec2-user/castestingapache/my_site_name_edu.pem 
SSLCertificateKeyFile /home/ec2-user/castestingapache/privatekey.pem
SSLCertificateChainFile /home/ec2-user/castestingapache/my_site_name_edu_interm.crt
# SSLCACertificateFile /etc/httpd/conf/bundle.txt 
SetEnvIf User-Agent “.*MSIE.*” nokeepalive ssl-unclean-shutdown
# CustomLog /usr/local/apache/logs/ssl_request_log \
# “%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \”%r\” %b”
</VirtualHost>
我相信问题在于我的证书没有指向这个IP地址

更新我刚刚在这里运行了证书安装检查器测试,这是我得到的:

注意:IP 12-34-56-78是我在AWS EC2实例上的私有IP地址

非常感谢您的帮助


谢谢,

啊。。。。答案一直在这个链接中

ssl.conf中的这一行:

<VirtualHost 00.000.000.00:443>

必须改为:

<VirtualHost _default_:443> 

加上其余的:

SSLCertificateKeyFile /etc/ssl/mydomain_com.key
SSLCertificateFile /etc/ssl/mydomain_com.crt
SSLCertificateChainFile /etc/ssl/mydomain_com.ca-bundle
</VirtualHost>
SSLCertificateKeyFile/etc/ssl/mydomain\u com.key
SSLCertificateFile/etc/ssl/mydomain\u com.crt
SSLCertificateChainFile/etc/ssl/mydomain\u com.ca-bundle

瞧!您的HTTPS:链接应该可以工作…

似乎有什么东西已经在使用端口443。是否有其他virtualhost可能正在使用同一端口,或者您以前是否运行过其他web服务器?我们确实有多个站点在AWS EC2实例上运行,且入站规则443端口范围处于打开状态。那有用吗?对不起!我刚刚删除了旧的ssl.conf,现在我的站点已备份。。。但我仍在尝试解决无效SSL证书错误。