1. NginX 환경파일 확인
server {
listen 8001;
server_name _;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# Load config files from the /etc/nginx/conf.d directory
설명 : SSL 환경 설정 파일 경로
include /etc/nginx/conf.d/*.conf;
2. SSL 설정
server {
listen 443;
설명 : SSL 서비스 포트 지정
server_name _;
ssl on;
ssl_certificate /etc/nginx/ssl/www.ucert.co.kr.crt;
설명 : 인증서 파일 경로 설정
ssl_certificate_key /etc/nginx/ssl/www.ucert.co.kr.key;
설명 : 개인키 파일 경로 설정
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
3. NginX 포트 및 만료일 확인
[root@localhost ~]# netstat -nap | grep 443
tcp 0 0 :::443 :::* LISTEN
443포트 Listen 된 상태에서 아래의 명령어를 사용하여 로컬에서 인증서를 확인 합니다.
[root@localhost ~]# openssl s_client -connect 127.0.0.1:443 | openssl x509
depth=2 C = US, O = GeoTrust Inc., CN = GeoTrust Global CA
verify error:num=20:unable to get local issuer certificate
verify return:0
-----BEGIN CERTIFICATE-----
MIIE2jCCA8KgAwIBAgICD/cwDQYJKoZIhvcNAQEFBQAwPDELMAkGA1UEBhMCVVMx
FzAVBgNVBAoTDkdlb1RydXN0LCBJbmMuMRQwEgYDVQQDEwtSYXBpZFNTTCBDQTAe
Fw0xMDEyMTQxMDQ4NTlaFw0xMjAyMTUyMTM4MjBaMIHlMSkwJwYDVQQFEyBrdW9u
SXgyYmI0a0lxZGpvWWE1bklYQWRxNVl6dG9RUDELMAkGA1UEBhMCS1IxGDAWBgNV
BAoTD3d3dy51Y2VydC5jby5rcjETMBEGA1UECxMKR1Q1NDc2OTQxMDExMC8GA1UE
CxMoU2VlIHd3dy5yYXBpZHNzbC5jb20vcmVzb3VyY2VzL2NwcyAoYykxMDEvMC0G
A1UECxMmRG9tYWluIENvbnRyb2wgVmFsaWRhdGVkIC0gUmFwaWRTU0woUikxGDAW
BgNVBAMTD3d3dy51Y2VydC5jby5rcjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBAMl6qA1dEc/FKw2qSjlh0iZDVGp+zqjBXW/iwkcnEZCzy/wxauh85OwM
G4TZ2FhJQabssuyVocWJGE/Fq3sO6U6lYZwycUKWN45sZTLGhdCbC0ZSb0OUq7tx
A8pDSqH/2/kG8a/Yfn8zGmXgsWi5swgfPKIa7dcmnmglA1x4YDquo0npWMizgt2z
mqQcuY5S/QKCDZo5Ee1BXaS4D7ZHiXzw5W9sDtsqo1nO37gLHTpNhIQrYnzN4ay7
l0FHLxiwEi2O/gndd4Z4/Rr0loFTdemStSPQlIRTag/+8/tMo+BoxHmPFTuWyNAb
MShN1eti+c0qWGsHigjvXMWtyg0NT4UCAwEAAaOCATowggE2MB8GA1UdIwQYMBaA
FGtpPWoYQkrdjwJlOf01JIZ4kRYwMA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAU
BggrBgEFBQcDAQYIKwYBBQUHAwIwJwYDVR0RBCAwHoIPd3d3LnVjZXJ0LmNvLmty
ggt1Y2VydC5jby5rcjBDBgNVHR8EPDA6MDigNqA0hjJodHRwOi8vcmFwaWRzc2wt
Y3JsLmdlb3RydXN0LmNvbS9jcmxzL3JhcGlkc3NsLmNybDAdBgNVHQ4EFgQUkHru
EM3YsHLS8SjMWr7kBkyKu/YwDAYDVR0TAQH/BAIwADBJBggrBgEFBQcBAQQ9MDsw
OQYIKwYBBQUHMAKGLWh0dHA6Ly9yYXBpZHNzbC1haWEuZ2VvdHJ1c3QuY29tL3Jh
cGlkc3NsLmNydDANBgkqhkiG9w0BAQUFAAOCAQEAcjR0KR5MnA8gJFhZ4GRHSfvD
N2WX88pZPtE0BlEOU18HLLg8xL5Bb8exvX5+sExHS9zasRHUIPAYpwALSf4/WP7M
96ZMAEAggR9Dt8pCyFO7QXgkB3QQ7EsEK+s01wSWxMN5/ZcSV7O0k/DF83DH118x
/DFVeGNJsbwC0BEzVe/HnmBo77dxCdG+M16R59s2BjEr9Lq9sNnnE3drqs51qrs+
T0CyUWSpZ9KhlwjcLCMKe/SY8WIXIYaAx+IqJ7XJQU+GV1AJP3zHldhngL7eMMFo
ROpAHbjfkI0XboRtTAVs0K46omCAA4JViVF1DDKaXPZ+swif4GlzY/ijwPLDkA==
-----END CERTIFICATE-----
인증서 만료일 확인 방법
[root@mail ~]# openssl s_client -connect localhost:443 < /dev/null 2>&1 | openssl x509 -noout -enddate
notAfter=Feb 15 21:38:20 2012 GMT
설명 : 로컬에서 인증서 출력이 정상적이고 외부에서 https://[도메인]으로 브라우저 접속 시 통신이 되지 않을 경우
내부 방화벽(예. iptables), 외부 방화벽 등에 SSL포트가 Allow (또는 웹방화벽에 인증서가 설치가) 되어 있는지
확인 합니다.