[Question] Một số lỗi khi cài đặt ssl trên Apache 2.26 |
29/03/2008 05:07:27 (+0700) | #1 | 121821 |
centos
Member
|
0 |
|
|
Joined: 28/03/2008 17:13:12
Messages: 219
Offline
|
|
Hi All
Mình đang xây dựng 1 webserver chạy bằng giao thức https://. Mình làm theo tài liệu http://www.securityfocus.com/infocus/1818
Lúc đầu mình config cho nó chạy, sau đó mình chay lại lệnh:
openssl req \
-new \
-x509 \
-days 30 \
-keyout /usr/local/apache2/conf/ssl.key/server.key \
-out /usr/local/apache2/conf/ssl.crt/server.crt \
-subj '/CN=Test-Only Certificate'
Thì nó phát sinh ra lỗi:
[Fri Mar 28 03:44:52 2008] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Mar 28 03:44:52 2008] [warn] RSA server certificate CommonName (CN) `Test-Only Certificate' does NOT match server name!?
[Fri Mar 28 03:44:52 2008] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Mar 28 03:44:52 2008] [warn] RSA server certificate CommonName (CN) `Test-Only Certificate' does NOT match server name!?
Trong khi đó server vẫn đang lắng nghe trên port 80 và 443
[root@localhost ssl.key]# netstat -an | grep 443
tcp 0 0 :::443 :::* LISTEN
[root@localhost ssl.key]# netstat -an | grep 80
tcp 0 0 :::80 :::* LISTEN
[root@localhost ssl.key]#
Khi mở trình duyệt để test thì nó báo lỗi:
you have received an invalid certificate. please contact the server administrator ar email correspondent and give them the following information
you certificate contains the same serial number as another certificate inssued by the cerficate authority. please get a new certificate containing a unique serial number
|
|
|
 |
 |
[Question] Một số lỗi khi cài đặt ssl trên Apache 2.26 |
29/03/2008 05:10:50 (+0700) | #2 | 121822 |
![[Avatar] [Avatar]](/hvaonline/images/avatar/089f41810321eefc3f4eef5d4a388e42.png)
|
conmale
Administrator
|
Joined: 07/05/2004 23:43:15
Messages: 9353
Location: down under
Offline
|
|
centos wrote:
Hi All
Mình đang xây dựng 1 webserver chạy bằng giao thức https://. Mình làm theo tài liệu http://www.securityfocus.com/infocus/1818
Lúc đầu mình config cho nó chạy, sau đó mình chay lại lệnh:
openssl req \
-new \
-x509 \
-days 30 \
-keyout /usr/local/apache2/conf/ssl.key/server.key \
-out /usr/local/apache2/conf/ssl.crt/server.crt \
-subj '/CN=Test-Only Certificate'
Thì nó phát sinh ra lỗi:
[Fri Mar 28 03:44:52 2008] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Mar 28 03:44:52 2008] [warn] RSA server certificate CommonName (CN) `Test-Only Certificate' does NOT match server name!?
[Fri Mar 28 03:44:52 2008] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Mar 28 03:44:52 2008] [warn] RSA server certificate CommonName (CN) `Test-Only Certificate' does NOT match server name!?
Trong khi đó server vẫn đang lắng nghe trên port 80 và 443
[root@localhost ssl.key]# netstat -an | grep 443
tcp 0 0 :::443 :::* LISTEN
[root@localhost ssl.key]# netstat -an | grep 80
tcp 0 0 :::80 :::* LISTEN
[root@localhost ssl.key]#
Khi mở trình duyệt để test thì nó báo lỗi:
you have received an invalid certificate. please contact the server administrator ar email correspondent and give them the following information
you certificate contains the same serial number as another certificate inssued by the cerficate authority. please get a new certificate containing a unique serial number
Xem lại đoạn màu đỏ. |
|
What bringing us together is stronger than what pulling us apart. |
|
 |
 |
[Question] Re: Một số lỗi khi cài đặt ssl trên Apache 2.26 |
29/03/2008 05:50:47 (+0700) | #3 | 121830 |
subnetwork
Member
|
0 |
|
|
Joined: 05/09/2004 06:08:09
Messages: 1666
Offline
|
|
Thấy nickname mang tên là centos cho nên tôi đoán bro sử dụng Linux distribution là centos
Nếu dùng centos 5 thì cd /etc/pki/tls/certs/, nếu dùng centos 4 thì cd /usr/share/ssl/certs sau đó make server.key , make server.crt tuỳ thích .
centos wrote:
Lúc đầu mình config cho nó chạy, sau đó mình chay lại lệnh:
openssl req \
-new \
-x509 \
-days 30 \
-keyout /usr/local/apache2/conf/ssl.key/server.key \
-out /usr/local/apache2/conf/ssl.crt/server.crt \
-subj '/CN=Test-Only Certificate'
# openssl genrsa -out /etc/key/server.key 1024
# openssl req -x509 -new -key /usr/local/apache2/conf/ssl.key/server.key -out /usr/local/apache2/conf/ssl.key/server.crt
Tham khảo http://www.openssl.org để biết thêm chi tiết
Good luck
|
|
Quản lý máy chủ, cài đặt, tư vấn, thiết kế, bảo mật hệ thống máy chủ dùng *nix
http://chamsocmaychu.com |
|
[Question] Re: Một số lỗi khi cài đặt ssl trên Apache 2.26 |
29/03/2008 12:50:41 (+0700) | #4 | 121905 |
centos
Member
|
0 |
|
|
Joined: 28/03/2008 17:13:12
Messages: 219
Offline
|
|
Cám ơn 2 anh nhiều lắm, vì thời gian gấp bách để biuild cái server cho khách hàng với lại em cũng mới tìm hiểu Linux được có 6 tháng nên vẫn chưa vững lắm mong 2 anh Chỉ giúp.
Thanks
-----------------------
Em không chỉnh sửa gì thêm trong ssl, chỉ restart lại apache thôi. Nhưng https:// của em nó hoạt động lại bình thường. Chắc có lẽ là nó bị loop ở đâu. |
|
|
[Question] Re: Một số lỗi khi cài đặt ssl trên Apache 2.26 |
29/03/2008 13:31:30 (+0700) | #5 | 121914 |
subnetwork
Member
|
0 |
|
|
Joined: 05/09/2004 06:08:09
Messages: 1666
Offline
|
|
centos wrote:
Cám ơn 2 anh nhiều lắm, vì thời gian gấp bách để biuild cái server cho khách hàng với lại em cũng mới tìm hiểu Linux được có 6 tháng nên vẫn chưa vững lắm mong 2 anh Chỉ giúp.
Thanks
-----------------------
Em không chỉnh sửa gì thêm trong ssl, chỉ restart lại apache thôi. Nhưng https:// của em nó hoạt động lại bình thường. Chắc có lẽ là nó bị loop ở đâu.
openssl req \
-new \
-x509 \
-days 30 \
-keyout /usr/local/apache2/conf/ssl.key/server.key \
-out /usr/local/apache2/conf/ssl.crt/server.crt \
-subj '/CN=Test-Only Certificate'
Bro tham khảo ở phần -subj này
countryName = VN
stateOrProvinceName = SAIGON
organizationName = SAIGON
commonName = hvaonline.net
emailAddress = goldenautumn_hva@gmail.com
Chúc bro tìm ra được bí kiếp  |
|
Quản lý máy chủ, cài đặt, tư vấn, thiết kế, bảo mật hệ thống máy chủ dùng *nix
http://chamsocmaychu.com |
|
[Question] Một số lỗi khi cài đặt ssl trên Apache 2.26 |
22/01/2009 05:33:13 (+0700) | #6 | 167265 |
![[Avatar] [Avatar]](/hvaonline/images/avatar/3f44f3018ff71ff4a7d22a98f3babb55.png)
|
quanta
Moderator
|
Joined: 28/07/2006 14:44:21
Messages: 7265
Location: $ locate `whoami`
Offline
|
|
[Fri Mar 28 03:44:52 2008] [warn] RSA server certificate CommonName (CN) `Test-Only Certificate' does NOT match server name!?
Vì topic lâu rồi nên chắc bạn cũng đã fix được. Tuy nhiên mình cũng xin diễn giải thêm một chút:
Khi tạo self-signed certificate hoặc CSR (Certificate Signing Request), phần CN (Common Name) bạn phải nhập vào FQDN (Fully Qualified Domain Name) của server. |
|
Let's build on a great foundation! |
|
Users currently in here |
1 Anonymous
|
|
Powered by JForum - Extended by HVAOnline
hvaonline.net | hvaforum.net | hvazone.net | hvanews.net | vnhacker.org
1999 - 2013 ©
v2012|0504|218|
|
|