간단하게 기록
■ 메인 - httpd.conf
Listen 80
LoadModule mime_module modules/mod_mime.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_html_module modules/mod_proxy_html.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule ssl_module modules/mod_ssl.so
ServerName localhost:80
Include conf/extra/httpd-vhosts.conf
Include conf/extra/httpd-ssl.conf
■ 메인 - httpd-ssl.conf
Listen 443
SSLCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
SSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
SSLHonorCipherOrder on
SSLProtocol all -SSLv3
SSLProxyProtocol all -SSLv3
SSLPassPhraseDialog builtin
SSLSessionCache "shmcb:C:/APM/Apache24/logs/ssl_scache(512000)"
SSLSessionCacheTimeout 300
<VirtualHost *:80>
ProxyPreserveHost On
ProxyRequests Off
ServerName [HostName]
ProxyPass / http://127.0.0.1:81/ retry=1 acquire=3000 timeout=600 Keepalive=On
ProxyPassReverse / http://127.0.0.1:81/
</VirtualHost>
<VirtualHost *:443>
ServerName [HostName]
SSLEngine on
SSLCertificateFile "C:/ProgramData/win-acme/httpsacme-v01.api.letsencrypt.org/[HostName]-crt.pem"
SSLCertificateKeyFile "C:/ProgramData/win-acme/httpsacme-v01.api.letsencrypt.org/[HostName]-key.pem"
SSLCertificateChainFile "C:/ProgramData/win-acme/httpsacme-v01.api.letsencrypt.org/ca-[HostName]-crt.pem"
ProxyPreserveHost On
SSLProxyEngine On
ProxyRequests Off
RequestHeader set Front-End-Https "On"
<Location />
Order allow,deny
Allow from all
ProxyPass https://127.0.0.1:444/ retry=1 acquire=3000 timeout=600 Keepalive=On
ProxyPassReverse https://127.0.0.1:444/
</Location>
</VirtualHost>
※ 위 메인 서버 설정은 단순 분기용 입니다.
1 : N 방식으로 멀티 도메인으로 접속 시킬때 도메인은 80으로 접속하지만
ServerName 으로 나누는 방식입니다.
여러개 도메인으로 접속할려면 복붙 해서 이름만 나누면 되겠죠 0-0
하단은 나머지 서브 도메인으로 만들 아니면 다른 도메인으로 접근할때
포트 번호가 서로 충돌 나지 않게 해주시면 됩니다.
■■ 서브 - httpd.conf
Listen 81
LoadModule ssl_module modules/mod_ssl.so
ServerName localhost:81
DocumentRoot "c:/webservice/subsite"
<Directory "c:/webservice/subsite">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Include conf/extra/httpd-ssl-subsite.conf
■■ 서브 - httpd-ssl-subsite.conf
Listen 444
SSLCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
SSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
SSLHonorCipherOrder on
SSLProtocol all -SSLv3
SSLProxyProtocol all -SSLv3
SSLPassPhraseDialog builtin
SSLSessionCache "shmcb:C:/logs/subsite_ssl_scache(512000)"
SSLSessionCacheTimeout 300
<VirtualHost *:444>
DocumentRoot "C:/webservice/subsite"
ServerName localhost
SSLEngine on
SSLCertificateFile "C:/ProgramData/win-acme/httpsacme-v01.api.letsencrypt.org/[HostName]-crt.pem"
SSLCertificateKeyFile "C:/ProgramData/win-acme/httpsacme-v01.api.letsencrypt.org/[HostName]-key.pem"
SSLCertificateChainFile "C:/ProgramData/win-acme/httpsacme-v01.api.letsencrypt.org/ca-[HostName]-crt.pem"
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "C:/APM/Apache24/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-5]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog "C:/APM/Apache24/logs/ssl_request.log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
대충 이정도 0-0
이상입니다.