Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet465/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   461   462   463   464   465   466   467   468   ...   482
Bog'liq
Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)

[
 362 
]
To get the ball rolling, we'll need a directory to house our certificates. I'll use 
/etc/
apache2/certs
 in my examples, although you can use whatever directory you'd 
like, as long as you remember to update Apache's configuration with your desired 
location and filenames:
sudo mkdir /etc/apache2/certs 
For a self-signed certificate and key, we can generate the pair with the following 
command. Feel free to change the name of the key and certificate files to match the 
name of your website:
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout \ /
etc/apache2/certs/mysite.key -out /etc/apache2/certs/mysite.crt 
You'll be prompted to enter some information for generating the certificate. Answer 
each prompt as they come along. Here's a list of the questions you'll be asked, along 
with my responses for each. Change the answers to fit your server, environment, 
organization name, and location:
Country Name (2 letter code) [AU]:US 
State or Province Name (full name) [Some-State]:Michigan 
Locality Name (eg, city) []:Detroit 
Organization Name (eg, company) [Internet Widgits Pty Ltd]:My Company 
Organizational Unit Name (eg, section) []:IT 
Common Name (e.g. server FQDN or YOUR name) []:myserver.mydomain.com 
Email Address []:webmaster@mycompany.com 
Now, you should see that two files have been created in the 
/etc/apache2/certs
 
directory, 
mysite.crt
 and 
mysite.key
, which represent the certificate and private 
key, respectively. Now that these files have been generated, the next thing for us to 
do is to configure Apache to use them. Look for the following two lines in the 
/etc/
apache2/sites-available/default-ssl.conf
 file:
SSLCertificateFile       /etc/ssl/certs/ssl-cert-snakeoil.pem 
SSLCertificateKeyFile  /etc/ssl/private/ssl-cert-snakeoil.key 
Comment these lines out by placing a 
#
 symbol in front of both:
# SSLCertificateFile      /etc/ssl/certs/ssl-cert-snakeoil.pem 
# SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key 


Chapter 14

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   461   462   463   464   465   466   467   468   ...   482




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish