
이제 Apache v2.4, php5.3.20을 사용하여 임베디드 서버를 구성하고 있습니다.
서버 버전: Apache/2.4.4 (Unix)
서버 구축: Jul 19 2013 11:41:42
잘 작동하지만 구성할 때 SSL 모드의 경우 더 이상 http 요청을 처리할 수 없습니다.
내 서버는 이제 https를 통해 페이지를 처리할 수 있지만 (의도적인 실수)와 같은 페이지를 요청하면 htt p://10.38.13.238/test.php
"HTTP/1.1 200 OK"와 같은 HTTP 패키지 없이 TCP 패키지(저는 Wireshark를 사용하여 파악했습니다)를 반환하고 웹 브라우저는 항상 " 10.38.13.238"에서 전송 중 빈 페이지가 표시됩니다. 추가 정보는 다음과 같습니다.
파일 etc/apache2/httpd.conf:
<VirtualHost *:80>
DocumentRoot "/usr/local/www/apache2/htdocs"
ServerName mustang:80
ServerAdmin [email protected]
# Host-specific directory setup, options, etc
# Most of these options are likely to be set outside the VirtualHosts
# sections.
</VirtualHost>
...
# Secure (SSL/TLS) connections
Include /etc/apache2/extra/httpd-ssl.conf
#
파일 /etc/apache2/extra/httpd-ssl.conf:
<VirtualHost *:443>
# General setup for the virtual host
DocumentRoot "/usr/local/www/apache2/htdocs/sslsite"
ServerName localhost:443
ServerAdmin [email protected]
ErrorLog "/usr/var/log/apache2/error_log"
TransferLog "/usr/var/log/apache2/access_log"
# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on
SSLCertificateFile "/etc/apache2/server.crt"
SSLCertificateKeyFile "/etc/apache2/server.key"
SSLVerifyClient none
...
SSLOptions +StrictRequire +FakeBasicAuth +ExportCertData +StdEnvVars
<Directory />
SSLRequireSSL
</Directory>
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "/usr/local/www/apache2/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
오류 로그 파일:
[Wed Aug 28 09:22:58.702230 2013] [mpm_worker:notice] [pid 1969:tid 548459311104] AH00298: SIGHUP received. Attempting to restart
[Wed Aug 28 09:22:58.812758 2013] [ssl:warn] [pid 1969:tid 548459311104] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Aug 28 09:22:58.814245 2013] [mpm_worker:notice] [pid 1969:tid 548459311104] AH00292: Apache/2.4.4 (Unix) OpenSSL/1.0.0j configured -- resuming normal operations
[Wed Aug 28 09:22:58.814285 2013] [core:notice] [pid 1969:tid 548459311104] AH00094: Command line: '/usr/sbin/httpd'
[Wed Aug 28 11:03:18.182732 2013] [mpm_worker:notice] [pid 1969:tid 548459311104] AH00295: caught SIGTERM, shutting down
[Wed Aug 28 11:03:33.782494 2013] [ssl:warn] [pid 2340:tid 547901157376] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Aug 28 11:03:33.990105 2013] [ssl:warn] [pid 2341:tid 547901157376] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Aug 28 11:03:33.991777 2013] [mpm_worker:notice] [pid 2341:tid 547901157376] AH00292: Apache/2.4.4 (Unix) OpenSSL/1.0.0j configured -- resuming normal operations
[Wed Aug 28 11:03:33.991847 2013] [core:notice] [pid 2341:tid 547901157376] AH00094: Command line: '/usr/sbin/httpd'
액세스 로그 파일:
10.38.5.238 - - [28/Aug/2013:11:32:50 +0000] "GET /test.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146
10.38.5.238 - - [28/Aug/2013:11:35:29 +0000] "GET /testxcache.php HTTP/1.1" 200 42
10.38.5.238 - - [28/Aug/2013:11:35:30 +0000] "GET /test.php HTTP/1.1" 200 47272
10.38.5.238 - - [28/Aug/2013:11:35:31 +0000] "GET /test.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2524
10.38.5.238 - - [28/Aug/2013:11:35:31 +0000] "GET /test.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146
10.38.5.238 - - [28/Aug/2013:11:35:33 +0000] "GET /test.php HTTP/1.1" 200 47272
10.38.5.238 - - [28/Aug/2013:11:35:33 +0000] "GET /test.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2524
10.38.5.238 - - [28/Aug/2013:11:35:33 +0000] "GET /test.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146
10.38.5.238 - - [28/Aug/2013:11:35:34 +0000] "GET /testxcache.php HTTP/1.1" 200 42
10.38.5.238 - - [28/Aug/2013:11:35:47 +0000] "GET /index.html HTTP/1.1" 200 45 10.38.5.238 - - [28/Aug/2013:11:36:07 +0000] "GET /test.php HTTP/1.1" 200 47272
10.38.5.238 - - [28/Aug/2013:11:36:07 +0000] "GET /test.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146
10.38.5.238 - - [28/Aug/2013:11:36:07 +0000] "GET /test.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2524
어떤 제안이라도 매우 감사하겠습니다. 감사해요.
P/s: 저는 이 사이트를 따라 Apache 서버에 대한 SSL을 구성합니다.
http://www.onlamp.com/2008/03/04/step-by-step-configuring-ssl-under-apache.html
http://forums.gentoo.org/viewtopic-p-6037402.html
답변1
HTTPS는 하나의 요청만 허용하고 세션을 즉시 닫으므로 KeepAlives와 호환되지 않습니다.
답변2
내 문제에 대한 답을 찾았습니다. 정말 이해가 안 되지만 만약 내가 변한다면
KeepAlive On
에게
KeepAlive Off
그러면 모든 것이 잘 작동합니다. 이제 내 서버는 HTTP와 HTTPS를 모두 처리할 수 있습니다. 어쨌든 감사합니다. 이 경우 KeepAlive의 의미를 이해하는 사람이 있으면 알려주십시오.