SlideShare ist ein Scribd-Unternehmen logo
1 von 26
APACHE 2
Secure HTTP With Apache Web Server

       By GOODLE CREW
Web Server



   Adalah suatu daemon yang berfungsi
    menerima request melalui protocol http
    baik dari local maupun dari internet
   Informasi yang direquest oleh web
    browser bisa berupa file yang ada dalam
    storage atau meminta server untuk
    melakukan funsgi tertentu
Macam Web Server



   IIS (web server untuk html & asp ).Bisa jalan di OS
    Windows
   APACHE       webserver     (web    server     untuk
    html,php,asp,jsp, dsb).Bisa jalan di OS Windows
    dan     LINUX.     Sifatnya    modular      dengan
    ditambahkan libapache2
APACHE Web Server dengan HTTPS


   HTTPS adalah varian dari protocol HTTP
    dimana user mengakses dengan https://
   Data yang dikirim ke server adalah data
    yang terenkripsi.
   Enkripsi yang digunakan adalah enkripsi
    SSL (Secure socket Layer).
   Menggunakan TCP port 443.
Ilustrasi Koneksi
 HTTP vs HTTPS


                   Normal HTTP (80)
  User




                                            SSL Certificate


            X
            User




         Encrypted Connection
                               Secure HTTP (443)
Mengkonfigurasi HTTPS

   Install apache2 dan modul PHP4
    •   # apt-get install apache2 php4 libapache2-mod-
        php4
   Buat Duplikat dari file:
/etc/apache2/sites-available/default
    •   # cp /etc/apache2/sites-available/default
        /etc/apache2/sites-available/website-ssl
   Buat link untuk mengaktifkan modul ssl saat
    apache di load
    •   # a2ensite
    •   Masukkan “website-ssl”
Mengkonfigurasi HTTPS

   Mengaktifkan modul php4
    • a2enmod
       • dijawab dengan “php4”
   mengaktifkan modul ssl
    • a2enmod
       • dijawab dengan “ssl”
Mengkonfigurasi HTTPS



   Kemudian Edit
    •   /etc/apache2/sites-enabled/website-ssl

NameVirtualHost *:443
<VirtualHost *:443>
  SSLEngine On
  SSLCertificateFile /etc/apache2/ssl/apache.pem
  ...

</VirtualHost>
Membuat Sertikat SSL



   Generate Sertifikat anda sendiri dengan
     • # apache2-ssl-certificate
     • kalo apache2-ssl-certificate tidak ada gunakan :
        • # mkdir /etc/apache2/ssl
        • # openssl req $@ -new -x509 -days 365 -nodes -out
         /etc/apache2/ssl/apache.pem -keyout
         /etc/apache2/ssl/apache.pem
     • Kemudian anda akan diminta memasukkan kode
      negara(ID),State atau propinsi,Nama
      Kota,Company,Section Unit,Domain,alamat email
Mengkonfigurasi HTTPS

   Menambahkan Port Listen Untuk
    SSL,untuk melakukanya edit file:
    • /etc/apache2/ports.conf
   Tambahkan Baris :
    • Listen   443
Mengkonfigurasi HTTPS




   Restart APACHE2
    • /etc/init.d/apache2   restart
Mencoba Setting HTTPS

   Buka web browser
   Cobalah ketikkan
    https://localhost/
Tampilan HTTPS
Tampilan HTTP biasa
mod-security
Mengkonfigurasi mod-security

   Mod-security ???
    • Bagaimana cara anda untuk membatasi SQL
        injection, mendefinisikan hanya satu web
        browser saja yg boleh akses, jumlah data, dll...
        --> membatasi lewat aplikasi
    •   Apache2 menyediakan modul
         • libapache2-mod-security
Mengkonfigurasi mod-security

   Install :
    • # apt-get install libapache2-mod-security
   Mengaktifkan module
    • a2enmod
    • isi dengan “mod-security”
Mengkonfigurasi mod-security

   Copy contoh konfigurasi
    • # cd /etc/apache2/conf.d
    • # cp /usr/share/doc/libapache2-mod-
      security/examples/httpd2.conf.example-full
      mod-security.conf
   Restart apache
    • # /etc/init.d/apache2 restart
Uji Coba mod-security

   Jalankan aplikasi testingnya
    • # cd /usr/share/mod-security/test/
    • # ./run-test.pl localhost *.test
   Buka website dengan webbrowser “w3m”
    dan mozilla
    • # w3m http://localhost
       • akan terjawab IIS ... lo bukannya tadi install apache2
        ???
Mod-chroot
Chroot

            chroot – change
             root directory
             • dir /var/www/
               berubah seolah-
               olah menjadi dir “/”
            apache2 jalan di
             chroot
Mengkonfigurasi mod-chroot

   Install module chroot
    • # apt-get install libapache2-mod-chroot
   Aktifkan module chroot
    • # a2enmod
    • isi dengan “mod_chroot”
Mengkonfigurasi mod-chroot

   Buat konfigurasi untuk mod-chroot, bisa
    di /etc/apache2/conf.d
    • # cd /etc/apache2/conf.d
    • vim mod-chroot
          <IfModule mod_chroot.c>
             LoadFile /lib/libgcc_s.so.1
          </IfModule>
          ChrootDir /var/www
Mengkonfigurasikan mod-chroot

   Buat dir untuk chroot
    • # mkdir -p /var/www/var/run
   Jalankan apache2
    • # /etc/init.d/apache2 start
   Rubah pidfile
    • # cd /var/run
    • # ln -s /var/www/var/run/apache2.pid
      apache2.pid
Mengkonfigurasi mod-chroot

   buat file coba.php
    <?
     system(“ls /etc”);
    ?>
   Script php untuk melihat isi dir /etc
   Bandingkan hasilnya antara ada mod-
    chroot dan tidak menggunakan mod-
    chroot
Selamat mencoba,...

Weitere ähnliche Inhalte

Was ist angesagt?

Tubes streaming arc
Tubes streaming arcTubes streaming arc
Tubes streaming arcdianulhaq
 
Konfigurasi https pada debian 7
Konfigurasi https pada debian 7Konfigurasi https pada debian 7
Konfigurasi https pada debian 7CyberSpace
 
Konfigurasi router debian 7
Konfigurasi router debian 7Konfigurasi router debian 7
Konfigurasi router debian 7sup4di
 
Instalasi Asterisk dan FreePBX di Ubuntu Server 10.04 LTS
Instalasi Asterisk dan FreePBX di Ubuntu Server 10.04 LTSInstalasi Asterisk dan FreePBX di Ubuntu Server 10.04 LTS
Instalasi Asterisk dan FreePBX di Ubuntu Server 10.04 LTSKangmas Zekon
 
Panduan instalasi setiadi2 di server ubuntu 16.04
Panduan instalasi setiadi2 di server ubuntu 16.04Panduan instalasi setiadi2 di server ubuntu 16.04
Panduan instalasi setiadi2 di server ubuntu 16.04Dwi Fajar Saputra
 
Install own cloud server di ubuntu 12
Install own cloud server di ubuntu 12Install own cloud server di ubuntu 12
Install own cloud server di ubuntu 12Arif Wahyudi
 
Pembahasansoallks2013
Pembahasansoallks2013Pembahasansoallks2013
Pembahasansoallks2013dedd_simbolon
 
Working Instruction Instalation Sinkronisasi Direktori LSYNCD
Working Instruction Instalation Sinkronisasi Direktori LSYNCDWorking Instruction Instalation Sinkronisasi Direktori LSYNCD
Working Instruction Instalation Sinkronisasi Direktori LSYNCDFebi Gelar Ramadhan
 
Transparan proxy
Transparan proxyTransparan proxy
Transparan proxyIsus Isusay
 
cara install nginx dengan php5 dan dukungan Mysql Di CentOS 6.5
cara install nginx dengan php5 dan dukungan Mysql Di CentOS 6.5cara install nginx dengan php5 dan dukungan Mysql Di CentOS 6.5
cara install nginx dengan php5 dan dukungan Mysql Di CentOS 6.5stephan EL'wiin Shaarawy
 
2013-44. Install Sistem Operasi melalui jaringan dengan ubuntu 10
2013-44. Install Sistem Operasi melalui jaringan dengan ubuntu 102013-44. Install Sistem Operasi melalui jaringan dengan ubuntu 10
2013-44. Install Sistem Operasi melalui jaringan dengan ubuntu 10Syiroy Uddin
 
2013-39. Install Sistem Operasi melalui jaringan dengan ubuntu 10
2013-39. Install Sistem Operasi melalui jaringan dengan ubuntu 102013-39. Install Sistem Operasi melalui jaringan dengan ubuntu 10
2013-39. Install Sistem Operasi melalui jaringan dengan ubuntu 10Syiroy Uddin
 
Perkembangan web server
Perkembangan web server Perkembangan web server
Perkembangan web server fatek
 
Tutorial Membangun SNORT Integrasi Terhadap MySQL dan BASE
Tutorial Membangun SNORT Integrasi Terhadap MySQL dan BASETutorial Membangun SNORT Integrasi Terhadap MySQL dan BASE
Tutorial Membangun SNORT Integrasi Terhadap MySQL dan BASEThomas Gregory
 

Was ist angesagt? (18)

Tubes streaming arc
Tubes streaming arcTubes streaming arc
Tubes streaming arc
 
Konfigurasi https pada debian 7
Konfigurasi https pada debian 7Konfigurasi https pada debian 7
Konfigurasi https pada debian 7
 
FreeBSD Web Server
FreeBSD Web ServerFreeBSD Web Server
FreeBSD Web Server
 
Konfigurasi router debian 7
Konfigurasi router debian 7Konfigurasi router debian 7
Konfigurasi router debian 7
 
Instalasi Asterisk dan FreePBX di Ubuntu Server 10.04 LTS
Instalasi Asterisk dan FreePBX di Ubuntu Server 10.04 LTSInstalasi Asterisk dan FreePBX di Ubuntu Server 10.04 LTS
Instalasi Asterisk dan FreePBX di Ubuntu Server 10.04 LTS
 
Panduan instalasi setiadi2 di server ubuntu 16.04
Panduan instalasi setiadi2 di server ubuntu 16.04Panduan instalasi setiadi2 di server ubuntu 16.04
Panduan instalasi setiadi2 di server ubuntu 16.04
 
Install own cloud server di ubuntu 12
Install own cloud server di ubuntu 12Install own cloud server di ubuntu 12
Install own cloud server di ubuntu 12
 
Pembahasansoallks2013
Pembahasansoallks2013Pembahasansoallks2013
Pembahasansoallks2013
 
FreeBSD Proxy Server
FreeBSD Proxy ServerFreeBSD Proxy Server
FreeBSD Proxy Server
 
Nutch dan Solr
Nutch dan SolrNutch dan Solr
Nutch dan Solr
 
Working Instruction Instalation Sinkronisasi Direktori LSYNCD
Working Instruction Instalation Sinkronisasi Direktori LSYNCDWorking Instruction Instalation Sinkronisasi Direktori LSYNCD
Working Instruction Instalation Sinkronisasi Direktori LSYNCD
 
Transparan proxy
Transparan proxyTransparan proxy
Transparan proxy
 
cara install nginx dengan php5 dan dukungan Mysql Di CentOS 6.5
cara install nginx dengan php5 dan dukungan Mysql Di CentOS 6.5cara install nginx dengan php5 dan dukungan Mysql Di CentOS 6.5
cara install nginx dengan php5 dan dukungan Mysql Di CentOS 6.5
 
2013-44. Install Sistem Operasi melalui jaringan dengan ubuntu 10
2013-44. Install Sistem Operasi melalui jaringan dengan ubuntu 102013-44. Install Sistem Operasi melalui jaringan dengan ubuntu 10
2013-44. Install Sistem Operasi melalui jaringan dengan ubuntu 10
 
2013-39. Install Sistem Operasi melalui jaringan dengan ubuntu 10
2013-39. Install Sistem Operasi melalui jaringan dengan ubuntu 102013-39. Install Sistem Operasi melalui jaringan dengan ubuntu 10
2013-39. Install Sistem Operasi melalui jaringan dengan ubuntu 10
 
Pembahasan soal paket 1
Pembahasan soal paket 1Pembahasan soal paket 1
Pembahasan soal paket 1
 
Perkembangan web server
Perkembangan web server Perkembangan web server
Perkembangan web server
 
Tutorial Membangun SNORT Integrasi Terhadap MySQL dan BASE
Tutorial Membangun SNORT Integrasi Terhadap MySQL dan BASETutorial Membangun SNORT Integrasi Terhadap MySQL dan BASE
Tutorial Membangun SNORT Integrasi Terhadap MySQL dan BASE
 

Andere mochten auch

Connecting Rural Communities
Connecting Rural CommunitiesConnecting Rural Communities
Connecting Rural Communitieswebhostingguy
 
HC INSTALLATION GUIDE
HC INSTALLATION GUIDE HC INSTALLATION GUIDE
HC INSTALLATION GUIDE webhostingguy
 
CIS Apache Benchmark V2
CIS Apache Benchmark V2CIS Apache Benchmark V2
CIS Apache Benchmark V2webhostingguy
 
Publishing a Web Site 4.02 Develop web pages using various ...
Publishing a Web Site 4.02 Develop web pages using various ...Publishing a Web Site 4.02 Develop web pages using various ...
Publishing a Web Site 4.02 Develop web pages using various ...webhostingguy
 
How to Use NDS eDirectory to Secure Apache Web Server for NetWare
How to Use NDS eDirectory to Secure Apache Web Server for NetWareHow to Use NDS eDirectory to Secure Apache Web Server for NetWare
How to Use NDS eDirectory to Secure Apache Web Server for NetWarewebhostingguy
 

Andere mochten auch (7)

Connecting Rural Communities
Connecting Rural CommunitiesConnecting Rural Communities
Connecting Rural Communities
 
HC INSTALLATION GUIDE
HC INSTALLATION GUIDE HC INSTALLATION GUIDE
HC INSTALLATION GUIDE
 
CIS Apache Benchmark V2
CIS Apache Benchmark V2CIS Apache Benchmark V2
CIS Apache Benchmark V2
 
Publishing a Web Site 4.02 Develop web pages using various ...
Publishing a Web Site 4.02 Develop web pages using various ...Publishing a Web Site 4.02 Develop web pages using various ...
Publishing a Web Site 4.02 Develop web pages using various ...
 
5-WebServers.ppt
5-WebServers.ppt5-WebServers.ppt
5-WebServers.ppt
 
Download It
Download ItDownload It
Download It
 
How to Use NDS eDirectory to Secure Apache Web Server for NetWare
How to Use NDS eDirectory to Secure Apache Web Server for NetWareHow to Use NDS eDirectory to Secure Apache Web Server for NetWare
How to Use NDS eDirectory to Secure Apache Web Server for NetWare
 

Ähnlich wie websecure.ppt

Tutorial Instalasi TKJ CLoud Server
Tutorial Instalasi TKJ CLoud ServerTutorial Instalasi TKJ CLoud Server
Tutorial Instalasi TKJ CLoud ServerKurniawan Suganda
 
TugasII SO2 Install Apache, PHP Dan MySQL Pada CentOS 7 (LAMP)
TugasII SO2 Install Apache, PHP Dan MySQL Pada CentOS 7 (LAMP)TugasII SO2 Install Apache, PHP Dan MySQL Pada CentOS 7 (LAMP)
TugasII SO2 Install Apache, PHP Dan MySQL Pada CentOS 7 (LAMP)ApriyantoGafur
 
Integrasi slims atau eprints dengan dspace
Integrasi slims atau eprints dengan dspaceIntegrasi slims atau eprints dengan dspace
Integrasi slims atau eprints dengan dspaceDwi Fajar Saputra
 
Install wordpress di linux
Install wordpress di linuxInstall wordpress di linux
Install wordpress di linuxkhobra
 
PENYELESAIAN UKK FIX TKJ SMK NEGERI 4 GORONTALO (2019)
PENYELESAIAN UKK FIX TKJ SMK NEGERI 4 GORONTALO (2019)PENYELESAIAN UKK FIX TKJ SMK NEGERI 4 GORONTALO (2019)
PENYELESAIAN UKK FIX TKJ SMK NEGERI 4 GORONTALO (2019)Walid Umar
 
Cara install apache, mysql, php, dan phpmyadmin pada freebsd 10
Cara install apache, mysql, php, dan phpmyadmin pada freebsd 10Cara install apache, mysql, php, dan phpmyadmin pada freebsd 10
Cara install apache, mysql, php, dan phpmyadmin pada freebsd 10manafhsb
 
Keamanan sistem informasi
Keamanan sistem informasiKeamanan sistem informasi
Keamanan sistem informasiwindi rohmaheny
 
Uji Kompetensi Keahlian 2014 teknik komputer dan jaringan
Uji Kompetensi Keahlian 2014 teknik komputer dan jaringanUji Kompetensi Keahlian 2014 teknik komputer dan jaringan
Uji Kompetensi Keahlian 2014 teknik komputer dan jaringanibnu sani
 
Instalasi ssh server
Instalasi ssh serverInstalasi ssh server
Instalasi ssh serverOcto Ayomy
 
Perkembangan web server di linux
Perkembangan web server di linuxPerkembangan web server di linux
Perkembangan web server di linuxNursaniATakome
 

Ähnlich wie websecure.ppt (20)

websecure.ppt
websecure.pptwebsecure.ppt
websecure.ppt
 
websecure.ppt
websecure.pptwebsecure.ppt
websecure.ppt
 
Web server HTTP dan HTTPS
Web server HTTP dan HTTPSWeb server HTTP dan HTTPS
Web server HTTP dan HTTPS
 
Tutorial Instalasi TKJ CLoud Server
Tutorial Instalasi TKJ CLoud ServerTutorial Instalasi TKJ CLoud Server
Tutorial Instalasi TKJ CLoud Server
 
Workshop & pelatihan
Workshop & pelatihanWorkshop & pelatihan
Workshop & pelatihan
 
TugasII SO2 Install Apache, PHP Dan MySQL Pada CentOS 7 (LAMP)
TugasII SO2 Install Apache, PHP Dan MySQL Pada CentOS 7 (LAMP)TugasII SO2 Install Apache, PHP Dan MySQL Pada CentOS 7 (LAMP)
TugasII SO2 Install Apache, PHP Dan MySQL Pada CentOS 7 (LAMP)
 
Integrasi slims atau eprints dengan dspace
Integrasi slims atau eprints dengan dspaceIntegrasi slims atau eprints dengan dspace
Integrasi slims atau eprints dengan dspace
 
Virtual host
Virtual hostVirtual host
Virtual host
 
Web server
Web serverWeb server
Web server
 
Presentasi (2).pptx
Presentasi (2).pptxPresentasi (2).pptx
Presentasi (2).pptx
 
Install wordpress di linux
Install wordpress di linuxInstall wordpress di linux
Install wordpress di linux
 
PENYELESAIAN UKK FIX TKJ SMK NEGERI 4 GORONTALO (2019)
PENYELESAIAN UKK FIX TKJ SMK NEGERI 4 GORONTALO (2019)PENYELESAIAN UKK FIX TKJ SMK NEGERI 4 GORONTALO (2019)
PENYELESAIAN UKK FIX TKJ SMK NEGERI 4 GORONTALO (2019)
 
Konfigurasi web server
Konfigurasi web serverKonfigurasi web server
Konfigurasi web server
 
Cara install apache, mysql, php, dan phpmyadmin pada freebsd 10
Cara install apache, mysql, php, dan phpmyadmin pada freebsd 10Cara install apache, mysql, php, dan phpmyadmin pada freebsd 10
Cara install apache, mysql, php, dan phpmyadmin pada freebsd 10
 
Keamanan sistem informasi
Keamanan sistem informasiKeamanan sistem informasi
Keamanan sistem informasi
 
Uji Kompetensi Keahlian 2014 teknik komputer dan jaringan
Uji Kompetensi Keahlian 2014 teknik komputer dan jaringanUji Kompetensi Keahlian 2014 teknik komputer dan jaringan
Uji Kompetensi Keahlian 2014 teknik komputer dan jaringan
 
Konfigurasi debian
Konfigurasi debianKonfigurasi debian
Konfigurasi debian
 
Instalasi ssh server
Instalasi ssh serverInstalasi ssh server
Instalasi ssh server
 
Perkembangan web server
Perkembangan web serverPerkembangan web server
Perkembangan web server
 
Perkembangan web server di linux
Perkembangan web server di linuxPerkembangan web server di linux
Perkembangan web server di linux
 

Mehr von webhostingguy

Running and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test FrameworkRunning and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test Frameworkwebhostingguy
 
MySQL and memcached Guide
MySQL and memcached GuideMySQL and memcached Guide
MySQL and memcached Guidewebhostingguy
 
Novell® iChain® 2.3
Novell® iChain® 2.3Novell® iChain® 2.3
Novell® iChain® 2.3webhostingguy
 
Load-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web serversLoad-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web serverswebhostingguy
 
SQL Server 2008 Consolidation
SQL Server 2008 ConsolidationSQL Server 2008 Consolidation
SQL Server 2008 Consolidationwebhostingguy
 
Master Service Agreement
Master Service AgreementMaster Service Agreement
Master Service Agreementwebhostingguy
 
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...webhostingguy
 
Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...webhostingguy
 
Managing Diverse IT Infrastructure
Managing Diverse IT InfrastructureManaging Diverse IT Infrastructure
Managing Diverse IT Infrastructurewebhostingguy
 
Web design for business.ppt
Web design for business.pptWeb design for business.ppt
Web design for business.pptwebhostingguy
 
IT Power Management Strategy
IT Power Management Strategy IT Power Management Strategy
IT Power Management Strategy webhostingguy
 
Excel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for MerchandisersExcel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for Merchandiserswebhostingguy
 
Parallels Hosting Products
Parallels Hosting ProductsParallels Hosting Products
Parallels Hosting Productswebhostingguy
 
Microsoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 MbMicrosoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 Mbwebhostingguy
 

Mehr von webhostingguy (20)

File Upload
File UploadFile Upload
File Upload
 
Running and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test FrameworkRunning and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test Framework
 
MySQL and memcached Guide
MySQL and memcached GuideMySQL and memcached Guide
MySQL and memcached Guide
 
Novell® iChain® 2.3
Novell® iChain® 2.3Novell® iChain® 2.3
Novell® iChain® 2.3
 
Load-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web serversLoad-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web servers
 
SQL Server 2008 Consolidation
SQL Server 2008 ConsolidationSQL Server 2008 Consolidation
SQL Server 2008 Consolidation
 
What is mod_perl?
What is mod_perl?What is mod_perl?
What is mod_perl?
 
What is mod_perl?
What is mod_perl?What is mod_perl?
What is mod_perl?
 
Master Service Agreement
Master Service AgreementMaster Service Agreement
Master Service Agreement
 
Notes8
Notes8Notes8
Notes8
 
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
 
Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...
 
Managing Diverse IT Infrastructure
Managing Diverse IT InfrastructureManaging Diverse IT Infrastructure
Managing Diverse IT Infrastructure
 
Web design for business.ppt
Web design for business.pptWeb design for business.ppt
Web design for business.ppt
 
IT Power Management Strategy
IT Power Management Strategy IT Power Management Strategy
IT Power Management Strategy
 
Excel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for MerchandisersExcel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for Merchandisers
 
OLUG_xen.ppt
OLUG_xen.pptOLUG_xen.ppt
OLUG_xen.ppt
 
Parallels Hosting Products
Parallels Hosting ProductsParallels Hosting Products
Parallels Hosting Products
 
Microsoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 MbMicrosoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 Mb
 
Reseller's Guide
Reseller's GuideReseller's Guide
Reseller's Guide
 

websecure.ppt

  • 1. APACHE 2 Secure HTTP With Apache Web Server By GOODLE CREW
  • 2. Web Server  Adalah suatu daemon yang berfungsi menerima request melalui protocol http baik dari local maupun dari internet  Informasi yang direquest oleh web browser bisa berupa file yang ada dalam storage atau meminta server untuk melakukan funsgi tertentu
  • 3. Macam Web Server  IIS (web server untuk html & asp ).Bisa jalan di OS Windows  APACHE webserver (web server untuk html,php,asp,jsp, dsb).Bisa jalan di OS Windows dan LINUX. Sifatnya modular dengan ditambahkan libapache2
  • 4. APACHE Web Server dengan HTTPS  HTTPS adalah varian dari protocol HTTP dimana user mengakses dengan https://  Data yang dikirim ke server adalah data yang terenkripsi.  Enkripsi yang digunakan adalah enkripsi SSL (Secure socket Layer).  Menggunakan TCP port 443.
  • 5. Ilustrasi Koneksi HTTP vs HTTPS Normal HTTP (80) User SSL Certificate X User Encrypted Connection Secure HTTP (443)
  • 6. Mengkonfigurasi HTTPS  Install apache2 dan modul PHP4 • # apt-get install apache2 php4 libapache2-mod- php4  Buat Duplikat dari file: /etc/apache2/sites-available/default • # cp /etc/apache2/sites-available/default /etc/apache2/sites-available/website-ssl  Buat link untuk mengaktifkan modul ssl saat apache di load • # a2ensite • Masukkan “website-ssl”
  • 7. Mengkonfigurasi HTTPS  Mengaktifkan modul php4 • a2enmod • dijawab dengan “php4”  mengaktifkan modul ssl • a2enmod • dijawab dengan “ssl”
  • 8. Mengkonfigurasi HTTPS  Kemudian Edit • /etc/apache2/sites-enabled/website-ssl NameVirtualHost *:443 <VirtualHost *:443> SSLEngine On SSLCertificateFile /etc/apache2/ssl/apache.pem ... </VirtualHost>
  • 9. Membuat Sertikat SSL  Generate Sertifikat anda sendiri dengan • # apache2-ssl-certificate • kalo apache2-ssl-certificate tidak ada gunakan : • # mkdir /etc/apache2/ssl • # openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/ssl/apache.pem -keyout /etc/apache2/ssl/apache.pem • Kemudian anda akan diminta memasukkan kode negara(ID),State atau propinsi,Nama Kota,Company,Section Unit,Domain,alamat email
  • 10. Mengkonfigurasi HTTPS  Menambahkan Port Listen Untuk SSL,untuk melakukanya edit file: • /etc/apache2/ports.conf  Tambahkan Baris : • Listen 443
  • 11. Mengkonfigurasi HTTPS  Restart APACHE2 • /etc/init.d/apache2 restart
  • 12. Mencoba Setting HTTPS  Buka web browser  Cobalah ketikkan https://localhost/
  • 16. Mengkonfigurasi mod-security  Mod-security ??? • Bagaimana cara anda untuk membatasi SQL injection, mendefinisikan hanya satu web browser saja yg boleh akses, jumlah data, dll... --> membatasi lewat aplikasi • Apache2 menyediakan modul • libapache2-mod-security
  • 17. Mengkonfigurasi mod-security  Install : • # apt-get install libapache2-mod-security  Mengaktifkan module • a2enmod • isi dengan “mod-security”
  • 18. Mengkonfigurasi mod-security  Copy contoh konfigurasi • # cd /etc/apache2/conf.d • # cp /usr/share/doc/libapache2-mod- security/examples/httpd2.conf.example-full mod-security.conf  Restart apache • # /etc/init.d/apache2 restart
  • 19. Uji Coba mod-security  Jalankan aplikasi testingnya • # cd /usr/share/mod-security/test/ • # ./run-test.pl localhost *.test  Buka website dengan webbrowser “w3m” dan mozilla • # w3m http://localhost • akan terjawab IIS ... lo bukannya tadi install apache2 ???
  • 21. Chroot  chroot – change root directory • dir /var/www/ berubah seolah- olah menjadi dir “/”  apache2 jalan di chroot
  • 22. Mengkonfigurasi mod-chroot  Install module chroot • # apt-get install libapache2-mod-chroot  Aktifkan module chroot • # a2enmod • isi dengan “mod_chroot”
  • 23. Mengkonfigurasi mod-chroot  Buat konfigurasi untuk mod-chroot, bisa di /etc/apache2/conf.d • # cd /etc/apache2/conf.d • vim mod-chroot <IfModule mod_chroot.c> LoadFile /lib/libgcc_s.so.1 </IfModule> ChrootDir /var/www
  • 24. Mengkonfigurasikan mod-chroot  Buat dir untuk chroot • # mkdir -p /var/www/var/run  Jalankan apache2 • # /etc/init.d/apache2 start  Rubah pidfile • # cd /var/run • # ln -s /var/www/var/run/apache2.pid apache2.pid
  • 25. Mengkonfigurasi mod-chroot  buat file coba.php <? system(“ls /etc”); ?>  Script php untuk melihat isi dir /etc  Bandingkan hasilnya antara ada mod- chroot dan tidak menggunakan mod- chroot