pythontr.com
Web Sitemiz var İse Kullanıcılarımız için ssl desteği verebiliriz peki bunun verilerin şifreli gidip gelmesinden başka bize avantajı ne olur? Proxy serverlarımızda rahatca cachleme yapabiliriz üyelik işlemleri sırasında sitemizi ssl üzerinden aktifleştirebiliriz.
SSL desteğini aktif hale getirme. Apache Modullerini açalım.
a2enmod ssl a2ensite default-ssl /etc/init.d/apache2 restart
Oluşturacağımız sertifakamızı customize yani ayarlayalım.
mkdir /etc/apache2/ssl cd /etc/apache2/ssl openssl req -x509 -days 1800 -newkey rsa:1024 -keyout pythontrkey.key -nodes -out pythontrcert.pem - "Organization Name" bölümün uniq bir firma adı girilecek. Böylece, web tarayıcıda bu sertifika için ayrı bir authority tanımlamak mümkün olacak. - "Common Name" bölümüne, siteye girerken kullanılan alan adı veya IP adresi girilecek. Yoksa web tarayıcıda, otomatik tanınan self-signed sertifika kaydı oluşturulamıyor.
Generating a 1024 bit RSA private key .++++++ .........................++++++ writing new private key to 'narsmedyacom_key.key' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:TR State or Province Name (full name) [Some-State]:Dumankaya Cad.bla bla Locality Name (eg, city) []:ISTANBUL Organization Name (eg, company) [Internet Widgits Pty Ltd]:Deneme Tic.Ltd.Sti. Organizational Unit Name (eg, section) []:xxxxx.com Common Name (e.g. server FQDN or YOUR name) []:*.xxxxx.com Email Address []:info@xxxxx.com
chmod 600 *
vim /etc/apache2/sites-enabled/default-ssl #SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem #SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key SSLCertificateFile /etc/apache2/ssl/pythontrcert.pem SSLCertificateKeyFile /etc/apache2/ssl/pythontrkey.key
<VirtualHost *:443> ServerAdmin webmaster@localhost ServerName www.pythontr.com DocumentRoot /home/www/pythontr.com SSLEngine on SSLCertificateFile /etc/apache2/ssl/pythontrcert.pem SSLCertificateKeyFile /etc/apache2/ssl/pythontrkey.key </VirtualHost>
Tüm gelen istekler için ports.conf dosyasını ayarlayalım.
<IfModule mod_ssl.c> # If you add NameVirtualHost *:443 here, you will also have to change # the VirtualHost statement in /etc/apache2/sites-available/default-ssl # to <VirtualHost *:443> # Server Name Indication for SSL named virtual hosts is currently not # supported by MSIE on Windows XP. NameVirtualHost *:443 Listen 443 </IfModule>
Öncelik servisimizi restart etmeden önce apache ayarlarını kontrol edelim.
apache2ctl configtest
Her hangi bir sıkıntı yok ise Servisimizi restart edelim
/etc/init.d/apache2 restart
Not: firewall kullanıyorsanız 443 https portuna izin vermeyi unutmayın.
İlgili Konular: csr dosyası oluşturma
Yorumlar