Apache 2.0 với giao thức SSL/TLS: Hướng dẫn từng bước (tiếp Phần I)
Số trang: 19
Loại file: pdf
Dung lượng: 296.57 KB
Lượt xem: 25
Lượt tải: 0
Xem trước 2 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Trước khi chạy Apache lần đầu tiên, chúng ta cũng cần cung cấp cấu hình ban số nội dung web mẫu. Ít nhất, chúng ta cần theo các bước sau (như là Root):1. Tạo một số nội dung web mẫu mà sẽ được đáp ứng qua SSL/TLS: umask 022 mkdir /www echo " Test works." /www/index.html chown -R root:sys /www 2. Thay thế file cấu hình Apache mặc định (thông thường được tìm thấy trong/usr/local/apache2/conf/httpd.conf) bằng một cái mới, dùng nội dung sau toàn và sự thực thi): # ...
Nội dung trích xuất từ tài liệu:
Apache 2.0 với giao thức SSL/TLS: Hướng dẫn từng bước (tiếp Phần I)Apache 2.0 với giao thức SSL/TLS: Hướng dẫntừng bước (tiếp Phần I)Cấu hình SSL/TLSTrước khi chạy Apache lần đầu tiên, chúng ta cũng cần cung cấp cấu hình bansố nội dung web mẫu. Ít nhất, chúng ta cần theo các bước sau (như là Root):1. Tạo một số nội dung web mẫu mà sẽ được đáp ứng qua SSL/TLS: umask 022 mkdir /www echo Test works. > /www/index.html chown -R root:sys /www2. Thay thế file cấu hình Apache mặc định (thông thường được tìm thấytrong/usr/local/apache2/conf/httpd.conf) bằng một cái mới, dùng nội dung sautoàn và sự thực thi): # =================================================# Basic settings# =================================================User apacheGroup apacheServerAdmin webmaster@www.seccure.labServerName www.seccure.labUseCanonicalName OffServerSignature OffHostnameLookups OffServerTokens ProdServerRoot /usr/local/apache2DocumentRoot /wwwPidFile /usr/local/apache2/logs/httpd.pidScoreBoardFile /usr/local/apache2/logs/httpd.scoreboard DirectoryIndex index.html# =================================================# HTTP and performance settings# =================================================Timeout 300KeepAlive OnMaxKeepAliveRequests 100KeepAliveTimeout 30 MinSpareServers 5 MaxSpareServers 10 StartServers 5 MaxClients 150 MaxRequestsPerChild 0# =================================================# Access control# ================================================= Options None AllowOverride None Order deny,allow Deny from all Order allow,deny Allow from all# =================================================# MIME encoding# ================================================= TypesConfig /usr/local/apache2/conf/mime.typesDefaultType text/plain AddEncoding x-compress .Z AddEncoding x-gzip .gz .tgz AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType application/x-tar .tgz AddType application/x-x509-ca-cert .crt AddType application/x-pkcs7-crl .crl# =================================================# Logs# =================================================LogLevel warnLogFormat %h %l %u %t \%r %>s %b \%{Referer}i \%{User-AcombinedLogFormat %h %l %u %t \%r %>s %b commonLogFormat %{Referer}i -> %U refererLogFormat %{User-agent}i agentErrorLog /usr/local/apache2/logs/error_logCustomLog /usr/local/apache2/logs/access_log combinedCustomLog logs/ssl_request_log \%t %h %{HTTPS}x %{SSL_PROTOCOL}x %{SSL_CIPHER}x \%{SSL_CIPHER_USEKEYSIZE}x %{SSL_CLIENT_VERIFY}x \%r# =================================================# SSL/TLS settings# =================================================Listen 0.0.0.0:443SSLEngine onSSLOptions +StrictRequire SSLRequireSSLSSLProtocol -all +TLSv1 +SSLv3SSLCipherSuite HIGH:MEDIUM:!aNULL:+SHA1:+MD5:+HIGH:+MESSLMutex file:/usr/local/apache2/logs/ssl_mutexSSLRandomSeed startup file:/dev/urandom 1024SSLRandomSeed connect file:/dev/urandom 1024SSLSessionCache shm:/usr/local/apache2/logs/ssl_cache_shmSSLSessionCacheTimeout 600 SSLPassPhraseDialog builtin SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crt SSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key SSLVerifyClient none SSLProxyEngine off AddType application/x-x509-ca-cert .crt AddType application/x-pkcs7-crl .crl SetEnvIf User-Agent .*MSIE.* nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.03. Chú ý: Các bạn nên thay đổi một số giá trị trong file cấu hình trên. Chẳng hserver, địa chỉ e-mail của người quản trị.v.v….4. Tham gia cấu trúc lại thư mục khoá private của web server, các chứng chồi chứng chỉ (CRLs). umask 022 mkdir /usr/local/apache2/conf/ssl.key mkdir /usr/local/apache2/conf/ssl.crt mkdir /usr/local/apache2/conf/ssl.crl5. Tạo một dịch vụ “tự kí nhận” (nó sẽ chỉ được dùng cho mục đích kiểm tracủa bạn nên lấy từ một CA thích hợp như Verisign): 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 CertificateKiểm tra phần cài đặtTại thời điểm này, chúng ta có thể bắt đầu Apache hỗ trợ SSL/TLS như sau: /usr/local/apache2/bin/apachectl startssl Apache/2.0.52 mod_ssl/2.0.52 (Pass Phrase Dialog) Some of your private key files are encrypted for security reasons. In order to read them you have to provide us with the pass phrases. Server 127.0.0 ...
Nội dung trích xuất từ tài liệu:
Apache 2.0 với giao thức SSL/TLS: Hướng dẫn từng bước (tiếp Phần I)Apache 2.0 với giao thức SSL/TLS: Hướng dẫntừng bước (tiếp Phần I)Cấu hình SSL/TLSTrước khi chạy Apache lần đầu tiên, chúng ta cũng cần cung cấp cấu hình bansố nội dung web mẫu. Ít nhất, chúng ta cần theo các bước sau (như là Root):1. Tạo một số nội dung web mẫu mà sẽ được đáp ứng qua SSL/TLS: umask 022 mkdir /www echo Test works. > /www/index.html chown -R root:sys /www2. Thay thế file cấu hình Apache mặc định (thông thường được tìm thấytrong/usr/local/apache2/conf/httpd.conf) bằng một cái mới, dùng nội dung sautoàn và sự thực thi): # =================================================# Basic settings# =================================================User apacheGroup apacheServerAdmin webmaster@www.seccure.labServerName www.seccure.labUseCanonicalName OffServerSignature OffHostnameLookups OffServerTokens ProdServerRoot /usr/local/apache2DocumentRoot /wwwPidFile /usr/local/apache2/logs/httpd.pidScoreBoardFile /usr/local/apache2/logs/httpd.scoreboard DirectoryIndex index.html# =================================================# HTTP and performance settings# =================================================Timeout 300KeepAlive OnMaxKeepAliveRequests 100KeepAliveTimeout 30 MinSpareServers 5 MaxSpareServers 10 StartServers 5 MaxClients 150 MaxRequestsPerChild 0# =================================================# Access control# ================================================= Options None AllowOverride None Order deny,allow Deny from all Order allow,deny Allow from all# =================================================# MIME encoding# ================================================= TypesConfig /usr/local/apache2/conf/mime.typesDefaultType text/plain AddEncoding x-compress .Z AddEncoding x-gzip .gz .tgz AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType application/x-tar .tgz AddType application/x-x509-ca-cert .crt AddType application/x-pkcs7-crl .crl# =================================================# Logs# =================================================LogLevel warnLogFormat %h %l %u %t \%r %>s %b \%{Referer}i \%{User-AcombinedLogFormat %h %l %u %t \%r %>s %b commonLogFormat %{Referer}i -> %U refererLogFormat %{User-agent}i agentErrorLog /usr/local/apache2/logs/error_logCustomLog /usr/local/apache2/logs/access_log combinedCustomLog logs/ssl_request_log \%t %h %{HTTPS}x %{SSL_PROTOCOL}x %{SSL_CIPHER}x \%{SSL_CIPHER_USEKEYSIZE}x %{SSL_CLIENT_VERIFY}x \%r# =================================================# SSL/TLS settings# =================================================Listen 0.0.0.0:443SSLEngine onSSLOptions +StrictRequire SSLRequireSSLSSLProtocol -all +TLSv1 +SSLv3SSLCipherSuite HIGH:MEDIUM:!aNULL:+SHA1:+MD5:+HIGH:+MESSLMutex file:/usr/local/apache2/logs/ssl_mutexSSLRandomSeed startup file:/dev/urandom 1024SSLRandomSeed connect file:/dev/urandom 1024SSLSessionCache shm:/usr/local/apache2/logs/ssl_cache_shmSSLSessionCacheTimeout 600 SSLPassPhraseDialog builtin SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crt SSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key SSLVerifyClient none SSLProxyEngine off AddType application/x-x509-ca-cert .crt AddType application/x-pkcs7-crl .crl SetEnvIf User-Agent .*MSIE.* nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.03. Chú ý: Các bạn nên thay đổi một số giá trị trong file cấu hình trên. Chẳng hserver, địa chỉ e-mail của người quản trị.v.v….4. Tham gia cấu trúc lại thư mục khoá private của web server, các chứng chồi chứng chỉ (CRLs). umask 022 mkdir /usr/local/apache2/conf/ssl.key mkdir /usr/local/apache2/conf/ssl.crt mkdir /usr/local/apache2/conf/ssl.crl5. Tạo một dịch vụ “tự kí nhận” (nó sẽ chỉ được dùng cho mục đích kiểm tracủa bạn nên lấy từ một CA thích hợp như Verisign): 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 CertificateKiểm tra phần cài đặtTại thời điểm này, chúng ta có thể bắt đầu Apache hỗ trợ SSL/TLS như sau: /usr/local/apache2/bin/apachectl startssl Apache/2.0.52 mod_ssl/2.0.52 (Pass Phrase Dialog) Some of your private key files are encrypted for security reasons. In order to read them you have to provide us with the pass phrases. Server 127.0.0 ...
Tìm kiếm theo từ khóa liên quan:
Kĩ thuật bảo mật bảo mật máy tính bảo vệ máy tính chống virus windows XP tinh chỉnh browserTài liệu có liên quan:
-
Giáo trình Bảo trì hệ thống và cài đặt phần mềm
68 trang 222 0 0 -
Tạo đĩa CD windows có bản quyền
5 trang 164 0 0 -
Thủ thuật về tắt máy tính từ menu chuột phải trên Windows 8
9 trang 81 0 0 -
Cách chia sẻ File, dữ liệu mạng Lan trong Windows Xp
10 trang 67 0 0 -
CompTIA A+ Complete Study Guide phần 4
99 trang 48 0 0 -
Ứng dụng công nghệ domain controller bảo mật máy tính người dùng
4 trang 48 0 0 -
26 thủ thuật Windows ấn tượng nhất
7 trang 44 0 0 -
Mã hóa dữ liệu và thư mục với EFS trong Windows 8
8 trang 43 0 0 -
Tiết kiệm điện cho máy tính - đồn đại và sự thật
4 trang 43 0 0 -
Giáo trình An toàn và bảo mật thông tin: Phần 1
85 trang 43 0 0