SlideShare a Scribd company logo
Making the secure communicationMaking the secure communication
between Server and Client withbetween Server and Client with
https protocolhttps protocol
Armenian e-Science Foundation (ArmeSFo) 49 Komitas Ave, 0051
Yerevan Armenia http://www.escience.am/
Armenuhi Abramyan, Hayk Haroyan
{armabram, hharoyan}@mail.yerphi.am
Content
1.1. Secure Socket Layer (SSL)Secure Socket Layer (SSL)
2.2. How SSL worksHow SSL works
3.3. Installing theInstalling the Apache 2.2.14Apache 2.2.14 server withserver with sslssl andand rewriterewrite modulesmodules
4. Configuring Apache for enabling module ssl
5.5. Creating the private key and self-signed certificate for serverCreating the private key and self-signed certificate for server
6.6. Starting the apache serverStarting the apache server
7. Testing the secure communication
8. Configuring Apache for enabling module rewrite and making some
(b) directory of web site under https protocol
9. Restarting the apache server, and trying to open any web page
under b directory with http protocol
SSL is the transaction security protocol used by websites to protect online
communications. The most common use of SSL is to provide protection for
confidential data, such as personal details or credit card information, entered into
a website.
Secure Socket Layer (SSL)Secure Socket Layer (SSL)
How SSL works
Installing the Apache 2.2.14 server with ssl and rewrite modulesInstalling the Apache 2.2.14 server with ssl and rewrite modules
$> tar -xvzf httpd-2.2.14.tar.gz
$> ./configure --prefix=/usr/local/httpd-2.2.14 --enable-modules='rewrite ssl‘
$> make
#> make install
1. Download the latest version of Apache server from www.apache.org
2. Install the Apache server by using the following commands:
#> vi /usr/local/httpd-2.2.14/conf/httpd.conf
Configuring Apache for enabling module ssl
1. Edit the apache config file (/usr/local/httpd-2.2.14/conf/httpd.conf)
# Secure (SSL/TLS) connections
Include conf/extra/httpd-ssl.conf
2. Uncomment the line of including the ssl config file then save and Quit (ESC+:wq)
#> cd /usr/local/httpd-2.2.14/conf/
#> vi extra/httpd-ssl.conf
3. Edit the ssl config file (/usr/local/httpd-2.2.14/conf/extra/httpd-ssl.conf)
Listen 443
SSLCertificateFile "/usr/local/httpd-2.2.14/conf/server.crt"
SSLCertificateKeyFile "/usr/local/httpd-2.2.14/conf/server.key"
Step 1: Generate a Private Key
#> openssl genrsa -des3 -out server.key 1024
Enter PEM pass phrase: //Type your password
Verifying password - Enter PEM pass phrase: //Retype your password
Note: Use the following command to remove the pass-phrase from the key
#> cp server.key server.key.withpass
#> openssl rsa -in server.key.withpass -out server.key
Step 2: Generate a CSR (Certificate Signing Request)
#> openssl req -new -key server.key -out server.csr
Enter pass phrase for server.key: //Type your private key password
Country Name (2 letter code) [GB]:AM
State or Province Name (full name) [Berkshire]: .
Locality Name (eg, city) [Newbury]: .
Organization Name (eg, company) [My Company Ltd]: .
Organizational Unit Name (eg, section) []: .
Common Name (eg, your name or your server's hostname) []: na601.yerphi.am
Email Address []: //Press Enter
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: //Press Enter
An optional company name []: //Press Enter
Step 3: Generating a Self-Signed Certificate
#> openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Signature ok
subject=/C=AM/CN=na601.yerphi.am
Starting the apache server
#> /usr/local/httpd-2.2.14/bin/apachectl start
Apache/2.2.14 mod_ssl/2.2.14 (Pass Phrase Dialog)
Some of your private key files are encrypted for security reasons.
In order to read them you have to provide the pass phrases.
Server www.example.com:443 (RSA)
Enter pass phrase: //Type your private key password
OK: Pass Phrase Dialog successful.
Testing the Secure communication
Open the browser with following url: https://localhost
Making the secure communication between Server and Client with https protocol
Making the secure communication between Server and Client with https protocol
Making the secure communication between Server and Client with https protocol
And we see that:
it works!
#> vi /usr/local/httpd-2.2.14/conf/httpd.conf
Configuring Apache for enabling module rewrite and making
some (b) directory of web site under https protocol
1. Edit the apache config file (/usr/local/httpd-2.2.14/conf/httpd.conf)
2. Add the following content, then save and Quit (ESC+:wq)
RewriteEngine On
#RewriteRule ^/a/(.*)$ /b/$1 [R]
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/b/(.*)$ https://localhost/b/$1 [L,R]
Restarting the apache server, and trying to open any web page
under b directory with http protocol
#> /usr/local/httpd-2.2.14/bin/apachectl restart
Apache/2.2.14 mod_ssl/2.2.14 (Pass Phrase Dialog)
Some of your private key files are encrypted for security reasons.
In order to read them you have to provide the pass phrases.
Server www.example.com:443 (RSA)
Enter pass phrase: //Type your private key password
OK: Pass Phrase Dialog successful.
When we try to open any web page under b directory
with http protocol, it's rewrites into https protocol
Thank you

More Related Content

PDF
Aws amazon ec2
DOC
Modul quick debserver
PPTX
Hadoop presentation
PPT
Apache Presentation
DOCX
Cent os 5 ssh
PDF
PDF
Manage Windows Like Linux via SSH using Ansible
TXT
Aws amazon ec2
Modul quick debserver
Hadoop presentation
Apache Presentation
Cent os 5 ssh
Manage Windows Like Linux via SSH using Ansible

What's hot (20)

PPT
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
TXT
Cluster setup multinode_aws
PDF
httpd — Apache Web Server
PDF
Instalar MySQL CentOS
PPS
Squidinstallation
PDF
Aeon mike guide transparent ssl filtering
PDF
Aeon mike guide transparent ssl filtering (1)
ODP
LAMP security practices
PDF
MySql Restore Script
PPTX
Hadoop presentation
PDF
Apache2 BootCamp : Getting Started With Apache
PPT
Presentation (PPT)
PDF
Secure Your Wordpress
PPT
Apache installation and configurations
PPTX
AWS 기반 Docker, Kubernetes
PDF
Config websocket on apache
PPTX
Install odoo v8 the easiest way on ubuntu debian
PPTX
Cluster Computing for $0.27/hr using Amazon EC2 and IPython Notebook
PPTX
Cloudera amazon-ec2
PPTX
บทที่ 3 การเขียนโปรแกรมติดต่อฐานข้อมูล
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
Cluster setup multinode_aws
httpd — Apache Web Server
Instalar MySQL CentOS
Squidinstallation
Aeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filtering (1)
LAMP security practices
MySql Restore Script
Hadoop presentation
Apache2 BootCamp : Getting Started With Apache
Presentation (PPT)
Secure Your Wordpress
Apache installation and configurations
AWS 기반 Docker, Kubernetes
Config websocket on apache
Install odoo v8 the easiest way on ubuntu debian
Cluster Computing for $0.27/hr using Amazon EC2 and IPython Notebook
Cloudera amazon-ec2
บทที่ 3 การเขียนโปรแกรมติดต่อฐานข้อมูล
Ad

Similar to Making the secure communication between Server and Client with https protocol (20)

PDF
Configuration of Self Signed SSL Certificate For CentOS 8
PPT
PDF
How To Install and Configure Apache SSL on CentOS 7
PDF
Apache Httpd and TLS certificates validations
PPTX
SSL self signed deployment on Ubuntu 16.04
PPTX
Random musings on SSL/TLS configuration
PDF
Apache Web Server
PPT
How to Install SSL Certificate in Red Hat Linux Apache Web Server
PDF
Apache web server tutorial for linux
PPTX
Secure socket layer
 
PPT
Ost ssl lec
PDF
NGiNX, VHOSTS & SSL (let's encrypt)
PPT
Securing Your Webserver By Pradeep Sharma
PDF
SSL, X.509, HTTPS - How to configure your HTTPS server
PPT
apache.ppt
KEY
PDF
TLS and Certificates
PDF
320.1-Cryptography
PPT
APACHE 2 HTTPS.ppt
PDF
Sử dụng TLS đúng cách - Phạm Tùng Dương
Configuration of Self Signed SSL Certificate For CentOS 8
How To Install and Configure Apache SSL on CentOS 7
Apache Httpd and TLS certificates validations
SSL self signed deployment on Ubuntu 16.04
Random musings on SSL/TLS configuration
Apache Web Server
How to Install SSL Certificate in Red Hat Linux Apache Web Server
Apache web server tutorial for linux
Secure socket layer
 
Ost ssl lec
NGiNX, VHOSTS & SSL (let's encrypt)
Securing Your Webserver By Pradeep Sharma
SSL, X.509, HTTPS - How to configure your HTTPS server
apache.ppt
TLS and Certificates
320.1-Cryptography
APACHE 2 HTTPS.ppt
Sử dụng TLS đúng cách - Phạm Tùng Dương
Ad

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Big Data Technologies - Introduction.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Electronic commerce courselecture one. Pdf
PDF
KodekX | Application Modernization Development
PDF
Approach and Philosophy of On baking technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Mobile App Security Testing_ A Comprehensive Guide.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Dropbox Q2 2025 Financial Results & Investor Presentation
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
“AI and Expert System Decision Support & Business Intelligence Systems”
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Understanding_Digital_Forensics_Presentation.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Big Data Technologies - Introduction.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
20250228 LYD VKU AI Blended-Learning.pptx
Spectroscopy.pptx food analysis technology
Electronic commerce courselecture one. Pdf
KodekX | Application Modernization Development
Approach and Philosophy of On baking technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11

Making the secure communication between Server and Client with https protocol

  • 1. Making the secure communicationMaking the secure communication between Server and Client withbetween Server and Client with https protocolhttps protocol Armenian e-Science Foundation (ArmeSFo) 49 Komitas Ave, 0051 Yerevan Armenia http://www.escience.am/ Armenuhi Abramyan, Hayk Haroyan {armabram, hharoyan}@mail.yerphi.am
  • 2. Content 1.1. Secure Socket Layer (SSL)Secure Socket Layer (SSL) 2.2. How SSL worksHow SSL works 3.3. Installing theInstalling the Apache 2.2.14Apache 2.2.14 server withserver with sslssl andand rewriterewrite modulesmodules 4. Configuring Apache for enabling module ssl 5.5. Creating the private key and self-signed certificate for serverCreating the private key and self-signed certificate for server 6.6. Starting the apache serverStarting the apache server 7. Testing the secure communication 8. Configuring Apache for enabling module rewrite and making some (b) directory of web site under https protocol 9. Restarting the apache server, and trying to open any web page under b directory with http protocol
  • 3. SSL is the transaction security protocol used by websites to protect online communications. The most common use of SSL is to provide protection for confidential data, such as personal details or credit card information, entered into a website. Secure Socket Layer (SSL)Secure Socket Layer (SSL)
  • 5. Installing the Apache 2.2.14 server with ssl and rewrite modulesInstalling the Apache 2.2.14 server with ssl and rewrite modules $> tar -xvzf httpd-2.2.14.tar.gz $> ./configure --prefix=/usr/local/httpd-2.2.14 --enable-modules='rewrite ssl‘ $> make #> make install 1. Download the latest version of Apache server from www.apache.org 2. Install the Apache server by using the following commands:
  • 6. #> vi /usr/local/httpd-2.2.14/conf/httpd.conf Configuring Apache for enabling module ssl 1. Edit the apache config file (/usr/local/httpd-2.2.14/conf/httpd.conf) # Secure (SSL/TLS) connections Include conf/extra/httpd-ssl.conf 2. Uncomment the line of including the ssl config file then save and Quit (ESC+:wq) #> cd /usr/local/httpd-2.2.14/conf/ #> vi extra/httpd-ssl.conf 3. Edit the ssl config file (/usr/local/httpd-2.2.14/conf/extra/httpd-ssl.conf) Listen 443 SSLCertificateFile "/usr/local/httpd-2.2.14/conf/server.crt" SSLCertificateKeyFile "/usr/local/httpd-2.2.14/conf/server.key"
  • 7. Step 1: Generate a Private Key #> openssl genrsa -des3 -out server.key 1024 Enter PEM pass phrase: //Type your password Verifying password - Enter PEM pass phrase: //Retype your password Note: Use the following command to remove the pass-phrase from the key #> cp server.key server.key.withpass #> openssl rsa -in server.key.withpass -out server.key
  • 8. Step 2: Generate a CSR (Certificate Signing Request) #> openssl req -new -key server.key -out server.csr Enter pass phrase for server.key: //Type your private key password Country Name (2 letter code) [GB]:AM State or Province Name (full name) [Berkshire]: . Locality Name (eg, city) [Newbury]: . Organization Name (eg, company) [My Company Ltd]: . Organizational Unit Name (eg, section) []: . Common Name (eg, your name or your server's hostname) []: na601.yerphi.am Email Address []: //Press Enter Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: //Press Enter An optional company name []: //Press Enter
  • 9. Step 3: Generating a Self-Signed Certificate #> openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt Signature ok subject=/C=AM/CN=na601.yerphi.am
  • 10. Starting the apache server #> /usr/local/httpd-2.2.14/bin/apachectl start Apache/2.2.14 mod_ssl/2.2.14 (Pass Phrase Dialog) Some of your private key files are encrypted for security reasons. In order to read them you have to provide the pass phrases. Server www.example.com:443 (RSA) Enter pass phrase: //Type your private key password OK: Pass Phrase Dialog successful.
  • 11. Testing the Secure communication Open the browser with following url: https://localhost
  • 15. And we see that: it works!
  • 16. #> vi /usr/local/httpd-2.2.14/conf/httpd.conf Configuring Apache for enabling module rewrite and making some (b) directory of web site under https protocol 1. Edit the apache config file (/usr/local/httpd-2.2.14/conf/httpd.conf) 2. Add the following content, then save and Quit (ESC+:wq) RewriteEngine On #RewriteRule ^/a/(.*)$ /b/$1 [R] RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^/b/(.*)$ https://localhost/b/$1 [L,R]
  • 17. Restarting the apache server, and trying to open any web page under b directory with http protocol #> /usr/local/httpd-2.2.14/bin/apachectl restart Apache/2.2.14 mod_ssl/2.2.14 (Pass Phrase Dialog) Some of your private key files are encrypted for security reasons. In order to read them you have to provide the pass phrases. Server www.example.com:443 (RSA) Enter pass phrase: //Type your private key password OK: Pass Phrase Dialog successful. When we try to open any web page under b directory with http protocol, it's rewrites into https protocol