Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.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
Php Apache 2.4 SSL 1.0.1端口冲突_Php_Apache_Ssl - Fatal编程技术网

Php Apache 2.4 SSL 1.0.1端口冲突

Php Apache 2.4 SSL 1.0.1端口冲突,php,apache,ssl,Php,Apache,Ssl,有一个apache环境,它正在托管一个基于PHP的网站。在配置SSL时遇到一些问题。httpd-ssl.conf文件最初指向端口443。但是,我改变了这一点,因为我假设它需要指向httpd.conf中配置的同一端口 以下是一些重要的httpd.conf配置 Listen 882 <virtualHost *:882> ServerAdmin admin@example.com DocumentRoot "/u/apache/htdocs/Hil"

有一个apache环境,它正在托管一个基于PHP的网站。在配置SSL时遇到一些问题。httpd-ssl.conf文件最初指向端口443。但是,我改变了这一点,因为我假设它需要指向httpd.conf中配置的同一端口

以下是一些重要的httpd.conf配置

Listen 882
<virtualHost *:882>
        ServerAdmin admin@example.com
        DocumentRoot "/u/apache/htdocs/Hil"
        ServerName server1
</virtualHost>
<virtualHost *:882>
        ServerAdmin admin@example.com
        DocumentRoot "/u/apache/htdocs/Hil"
        ServerName server1
        <directory "/u/apache/htdocs/Hil">
                 Order allow,deny
           Allow from all
           # New directive needed in Apache 2.4.3:
           Require all granted
        </directory>
</virtualHost>

<IfModule mod_rewrite>
    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
</IfModule>

TraceEnable off 

看起来882已被同一服务器上的其他进程使用。还要确保你在服务器上有SUDO访问权限。这就是我的想法。但是我做了netstat-pln并扫描了882,没有发现它在使用中。将httpd-ssl.conf中的端口更改为882以外的端口。将其保留为443,然后重试。您要求apache在端口882上侦听两次..这允许启动httpd。但我不确定它的配置是否正确。我更改了侦听,https请求将尝试在apache服务器上查找443端口,因此,如果未配置443,将永远不会提供请求。我建议在httpd-ssl.conf中配置443而不是885
Listen 882
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLPassPhraseDialog  builtin
SSLSessionCache        "shmcb:/u/apache/logs/ssl_scache(512000)"
SSLSessionCacheTimeout  300

<VirtualHost _default_:882>

#   General setup for the virtual host
DocumentRoot "/u/apache/htdocs"
ServerName server1:882
ServerAdmin you@example.com
ErrorLog "/u/apache/logs/error_log"
TransferLog "/u/apache/logs/access_log"


SSLEngine on


SSLCertificateFile "/u/apache/conf/extra/certs/qa.cer"
SSLCertificateKeyFile "/u/apache/conf/extra/certs/qa.key"
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:882
no listening sockets available, shutting down
AH00015: Unable to open logs