에서 Apache2와 함께 mod_spdy 사용.png)
OpenSUSE 12.2(x86_64)에서 Apache2와 함께 mod_spdy 사용
2022-10-19 last update
6 minutes reading apache suse web serverSPDY("SPeeDY"로 발음)는 웹 속도를 높이는 것이 목표인 새로운 네트워킹 프로토콜입니다. HTTP 프로토콜에 대한 Google의 대안이며 HTTP/2.0의 후보입니다. SPDY는 스트림 다중화 및 헤더 압축과 같은 몇 가지 속도 관련 기능으로 HTTP를 보강합니다. SPDY를 사용하려면 SPDY를 지원하는 웹 서버와 브라우저(Google Chrome 및 향후 Firefox 버전 등)가 필요합니다. mod_spdy는 Apache HTTPD 서버에 SPDY 프로토콜에 대한 지원을 추가하는 오픈 소스 Apache 모듈입니다. 이 자습서에서는 OpenSUSE 12.2에서 Apache2와 함께 mod_spdy를 사용하는 방법을 설명합니다.
SPDY는 HTTPS를 통해 실행되므로 SPDY를 테스트하려면 HTTPS 지원 웹 사이트가 필요합니다. 사용자의 브라우저가 SPDY를 지원하지 않거나 문제가 발생하면 SPDY가 HTTPS로 대체되므로 mod_spdy를 설치해도 기존 설정이 손상되지 않습니다.
Installing Apache2 With PHP5 And MySQL Support On OpenSUSE 12.2 (LAMP) 에 설명된 대로 작동하는 LAMP 설정이 있다고 가정합니다.
계속 진행하기 전에 Apache에서 SSL을 활성화해야 합니다.
기본 SSL 가상 호스트에 대한 자체 서명 인증서 생성...

mod_spdy는 다음과 같이 설치할 수 있습니다.
다음으로 mod_spdy 구성 파일/etc/apache2/conf.d/spdy.conf를 만듭니다.
구성 옵션에 대한 자세한 내용은 https://developers.google.com/speed/spdy/mod_spdy/install 에서 확인할 수 있습니다.
나중에 Apache를 다시 시작하십시오.
이제 SPDY가 작동하는지 테스트해 보겠습니다. SPDY를 지원하는 브라우저가 필요합니다. 예를 들어 구글 크롬. Chrome을 열고 SSL 웹 사이트(예: https://www.example.com)를 다시 로드합니다. SPDY를 사용할 수 있도록 다시 로드하는 것이 중요합니다(1장에서 처음 로드할 때 일반 HTTPS를 사용함). 그런 다음 새 탭을 열고 URL을 입력하십시오.

(SPDY의 HTTPS 대체 메커니즘으로 인해 SSL 가상 호스트는 SPDY를 지원하지 않는 다른 브라우저에서 계속 작동합니다.)
SPDY: https://developers.google.com/speed/spdy/
아파치 mod_spdy: http://code.google.com/p/mod-spdy/
mod_spdy 구성: https://developers.google.com/speed/spdy/mod_spdy/install
아파치: http://httpd.apache.org/
오픈수세: http://www.opensuse.org/
1 서문
SPDY는 HTTPS를 통해 실행되므로 SPDY를 테스트하려면 HTTPS 지원 웹 사이트가 필요합니다. 사용자의 브라우저가 SPDY를 지원하지 않거나 문제가 발생하면 SPDY가 HTTPS로 대체되므로 mod_spdy를 설치해도 기존 설정이 손상되지 않습니다.
Installing Apache2 With PHP5 And MySQL Support On OpenSUSE 12.2 (LAMP) 에 설명된 대로 작동하는 LAMP 설정이 있다고 가정합니다.
계속 진행하기 전에 Apache에서 SSL을 활성화해야 합니다.
a2enmod ssl
a2enflag SSL
systemctl restart apache2.service테스트 목적으로 OpenSUSE의 Apache 패키지와 함께 제공되는 기본 SSL 웹 사이트를 사용하겠습니다(서버에 SSL 웹 사이트가 이미 있는 경우에는 이 작업을 수행할 필요가 없습니다).
기본 SSL 가상 호스트에 대한 자체 서명 인증서 생성...
openssl genrsa -des3 -out /etc/apache2/ssl.key/server.key.org 4096
openssl req -new -key /etc/apache2/ssl.key/server.key.org -out /etc/apache2/ssl.crt/server.csr
openssl x509 -req -days 365 -in /etc/apache2/ssl.crt/server.csr -signkey /etc/apache2/ssl.key/server.key.org -out /etc/apache2/ssl.crt/server.crt
openssl rsa -in /etc/apache2/ssl.key/server.key.org -out /etc/apache2/ssl.key/server.key
chmod 400 /etc/apache2/ssl.key/server.key... 기본 SSL 가상 호스트를 활성화합니다.
cd /etc/apache2/vhosts.d
cp vhost-ssl.template vhost-ssl.conf
systemctl restart apache2.service기본 SSL 웹 사이트의 URL(예: https://www.example.com)로 이동하여 작동하는지 테스트합니다(여기에서 기본 자체 서명된 인증서를 사용하고 있기 때문에 인증서 경고가 있지만 여기에는 SPDY 사용에 대한 영향; 또한 403 Forbidden 오류에 대해 걱정하지 마십시오. 이 오류는 문서 루트에 색인 파일이 없기 때문에 발생합니다.

2 mod_spdy 설치
mod_spdy는 다음과 같이 설치할 수 있습니다.
zypper install http://download.opensuse.org/repositories/Apache/openSUSE_12.2/x86_64/apache2-mod_spdy-0.9.1.5-1.1.x86_64.rpm(안타깝게도 이 글을 쓰는 시점에는 i386 시스템용 mod_spdy 패키지가 없으므로 x86_64 시스템에서만 작동합니다.)
다음으로 mod_spdy 구성 파일/etc/apache2/conf.d/spdy.conf를 만듭니다.
vi /etc/apache2/conf.d/spdy.conf
LoadModule spdy_module /usr/lib64/apache2/libmod_spdy.so <IfModule spdy_module> # Turn on mod_spdy. To completely disable mod_spdy, you can set # this to "off". SpdyEnabled on # In order to support concurrent multiplexing of requests over a # single connection, mod_spdy maintains its own thread pool in # each Apache child process for processing requests. The default # size of this thread pool is very conservative; you can override # it with a larger value (as below) to increase concurrency, at # the possible cost of increased memory usage. # #SpdyMaxThreadsPerProcess 30 # Memory usage can also be affected by the maximum number of # simultaneously open SPDY streams permitted for each client # connection. Ideally, this limit should be set as high as # possible, but you can tweak it as necessary to limit memory # consumption. # #SpdyMaxStreamsPerConnection 100 </IfModule>
구성 옵션에 대한 자세한 내용은 https://developers.google.com/speed/spdy/mod_spdy/install 에서 확인할 수 있습니다.
나중에 Apache를 다시 시작하십시오.
systemctl restart apache2.service
3 테스트
이제 SPDY가 작동하는지 테스트해 보겠습니다. SPDY를 지원하는 브라우저가 필요합니다. 예를 들어 구글 크롬. Chrome을 열고 SSL 웹 사이트(예: https://www.example.com)를 다시 로드합니다. SPDY를 사용할 수 있도록 다시 로드하는 것이 중요합니다(1장에서 처음 로드할 때 일반 HTTPS를 사용함). 그런 다음 새 탭을 열고 URL을 입력하십시오.
chrome://net-internals/#spdy모든 것이 잘 되었다면 이제 SSL 가상 호스트가 SPDY 지원이 작동 중임을 의미하는 표에 나열되어야 합니다.

(SPDY의 HTTPS 대체 메커니즘으로 인해 SSL 가상 호스트는 SPDY를 지원하지 않는 다른 브라우저에서 계속 작동합니다.)