Rabu, 31 Agustus 2016

Install Wordpress

Install WordPress Di Localhost Menggunakan XAMPP

Sebelumnya saya menulis bagaimana cara menambah database dan user menggunakan XAMPP di bagian phpmyadmin. Langkah ini diperlukan karena WordPress akan menggunakan database dan user tersebut untuk mengelola data-data yang kita gunakan. Jika Anda belum bisa menambah database dan user, Anda bisa membaca terlebih dahulu bagaimana cara membuat database menggunakan XAMPP.
Selanjutnya, saya akan membahas bagaiamana cara install WordPress di localhostmenggunakan XAMPP. Cukup mudah sebenarnya, namun memang membutuhkan sedikit kecermatan dan sering coba-coba. Try try and try teruuus…

Instalasi WordPress Di Localhost

  1. Siapkan file WordPress terbaru. Kalau belum punya bisa ngunduh dulu atau download langsung di WordPress.org.
  2. Buka folder XAMPP di komputer Anda. Lalu bukalah folder htdocs. Copy-kan file WordPress ke dalam folder ini. Lebih mudahnya, buka Windows Explorer, lalu ketik C:\xampp\htdocs pada bagian folder address seperti terlihat pada gambar di bawah ini.
    folder xampp di windows
    *) NB:
    Folder htdocs merupakan folder yang dipakai untuk menaruh file-file yang bisa dibuka di browser. Jika kita menaruh selain di folder ini, maka browser tidak akan bisa membukanya. Biasanya kalau settingan masih default, folder ada di drive C. Jadi pastikan jangan salah taruh ya..
  3. Apabila file masih dalam bentuk compress, maka ekstrak terlebih dahulu. Default folder hasil ekstrak biasanya bernama ‘wordpress’. Jika mau, nantinya Anda bisa mengganti nama folder ini menjadi nama yang Anda sukai. Katakanlah nama website Anda. Di sini saya menggantinya dengan nama‘blogku’. Jika diakses, hasilnya akan terlihat seperti gambar di bawah ini:
    instal wordpress di localhost, folder htdocs xampp, xampp
  4. Sekarang bukalah browser favorit Anda. Untuk membuka situs wordpress offline ini, nantinya kita bisa mengaksesnya dengan alamathttp://localhost/nama_folder. Kalau milik saya ya bukanya pakai alamathttp://localhost/blogku. Jika milik Anda tetap memakai folder default, maka alamatnya http://localhost/wordpress. Ketikkan di address bar. Lalu klik Create a Configuration File.
    install wordpress di localhost
  5. Klik Let’s Go.
    9-wordpress-start
  6. Isikan nama database, user name, dan password yang sudah Anda buat sebelumnya. Jika belum, Anda bisa membacanya pada tutorial cara membuat database menggunakan XAMPP. Pada bagian Database Host isikan dengan localhost saja. Klik Submit.
    10-form-isian-database-wordpress-offline
  7. Klik Run the Install.
    11-jalankan-instalasi-wordpress-offline
  8. Isikan data-data yang dibutuhkan untuk admin dan nama website. Setelah itu klik install wordpress.
    12-isian-informasi-wordpress-install
  9. Selamat! WordPress offline Anda sudah jadi. Silahkan Login.
    13-install-wordpress-offline-sukses
  10. Masukkan username dan password yang telah Anda buat pada langkah no.8untuk login ke Dashboard. Cara lain bisa langsung mengetikkan alamat di browser http://localhost/nama_folder/wp-admin. Jika di tempat saya berarti menggunakan alamat http://localhost/blogku/wp-admin.
    14-wordpress-login
Nah, demikianlah langkah-langkah bagaimana kita menginstal WordPress offline di localhost menggunakan XAMPP.
Silahkan bagikan atau share artikel ini jika dirasa ada membutuhkan. Semoga bermanfaat.

Openam konek to apache


In this tutorial, we will explore how to federate OpenAM credentials with Apache. We will use OpenAM as SAML 2.0 identity provider and Apache as Service Provider, thus providing effective Single SignOn. We will use mod_auth_mellon for enabling SAML in Apache.

The scenario is very intuitive: we have a Apache instance that we want to manage, and at the same time we have an OpenAM installation that acts as identity provider. We want to Federate the Apache access.

First of all, an User accesses the protected Apache page: the request is redirected immediately to the Identity Provider, with a SAML request. The identity provider elaborates the SAML request, and performs the User Authentication using a form. Once authenticated, the identity provider redirects a SAML response to the services provider. In our case the mod_auth_mellon elaborates the request, at the end of this phase, user is logged in.

The scenario is very intuitive: we have a Apache instance that we want to manage, and at the same time we have an OpenAM installation that acts as identity provider. We want to Federate the Apache access.



  • Install OpenAM

    In our example we will use an embedded instance of openDJ. Moreover, we are using as main host www.example.com, resolved locally, in order to perform Single SignOn: the same host must be chosen during Apache installation.
    Link: OpenAM Installation

  • Install Apache2

    $apt-get install apache2

  • Install PHP

    $apt-get install php5 libapach2-mod-php5 php5-mcrypt

  • Install Mod_Auth_Mellon with dependencies

    $apt-get install openssl
    $apt-get install pkg-config
    $apt-get install libalsso3
    $apt-get install libapachemod-auth-mellon  

  • OpenAM: Circle of Trust

    Now we have to configure OpenAM. First of all, we have to create a Circle Of Trust (COT). In order to do this, in the OpenAM home page click on Federation and after click new in the COT table.
In this example we are referring to top realm (/), but you can refer to another one.




  • OpenAM: Hosted Identity Provider


  • Now go back to OpenAM home page. Click on “Create hosted identity provider” on the common tasks tab. Also in this case choose your realm (in our case \ ) Use the “Test” signing key.
    At the end click on Configure button and click Finish. In this way we have created the hosted identity provider.





    • Apache: Mod_Auth_Mellon metadata

    Download the mod_auth_mellon code, we will use the script in the repository to generate the metadata.
    $git clone https://github.com/UNINETT/mod_auth_mellon.git
    mod_auth_mellon requires metadata for your service provider. To create this metadata, you can use a script:
    mellon_create_metadata.sh
    This script takes in two options:
            The entity ID, which identifies your service.
            The base URL to the endpoints for mod_auth_mellon.  
        Example:
        $./mellon_create_metadata.sh http://www.example.com/myEntityID http://www.example.com/secret 

    This will create three files: 
            A .key-file, which contains the private key in PEM format. This file should be set in the MellonSPPrivateKeyFile option.
            A .cert-file, which contains the certificate in PEM format. This file should be set in the MellonSPCertFile option.
            A .xml-file, which contains the metadata file for the SP. This file should be set in the MellonSPMetadataFile option.
    You should save the files in some directory, e.g./etc/apache2/mellon. The files should also be readable by the web-server. You may therefore have to change the owner to the user Apache is running as. 

    • OpenAM: IDP Metadata 
      Next, you need to add the metadata of OpenAM to Mod_auth_Mellon. 
      Example: 
      http://www.example.com:8080/openam/saml2/jsp/exportmetadata.jsp
      Access the above link and download the XML data to a file and name it as idp-metadata.xml and copy to /etc/apache2/mellon
       
    • Configuring Mod_Auth_Mellon
    This configuration assumes that you want to provide attributes from mod_auth_mellon to all scripts on your server, while only triggering authentication if the user accesses, add this configuration to the /etc/apache2/sites-enabled/000-default.conf file
    # This is a server-wide configuration that will add information from the Mellon session to all requests.
    <Location />
        # Add information from the mod_auth_mellon session to the request.
        MellonEnable "info"

        # Configure the SP metadata
        # This should be the files which were created when creating SP metadata.
        MellonSPPrivateKeyFile /etc/apache2/mellon/http_www.example.com_myEntityID.key

        MellonSPCertFile /etc/apache2/mellon/http_www.example.com_myEntityID.cert
        MellonSPMetadataFile /etc/apache2/mellon/http_www.example.com_myEntityID.xml

        # IdP metadata. This should be the metadata file you got from the IdP.
        MellonIdPMetadataFile /etc/apache2/mellon/idp-metadata.xml

        # The location all endpoints should be located under.
        # It is the URL to this location that is used as the second parameter to the metadata generation script.
        # This path is relative to the root of the web server.
        MellonEndpointPath /mellon
    </Location>

    # This is a location that will trigger authentication when requested.
    <Location /auth_mellon.php>
        # This location will trigger an authentication request to the IdP.
        MellonEnable "auth"
    </Location>

    • Remote Service Provider
    Download the xml file(SP Metadata) and go to OpenAM and click on the Common Tasks Tab. Then, click on “Register Remote Service Provider”. Select the your relam (in our case “/”): Choose File radio. Upload the SP metadata XML The circle of trust must be the same as the one that was created in the previous steps.

    If the meta-data URL is correct, OpenAM will show a popup windows confirming your configuration. 
    Change the default URL of the Service Provider to the Apache home page. 
    In the OpenAM home page click on Federation, in the entity provider list click on the SP, in the new page click on the Services tab and at the bottom change the Assertion consuer service to http://www.example.com/, this is the page OpenAM will redirect to after the authentication. 

    • Testing the Federation
    Create a PHP script named "auth_mellon.php" with the following contents under /var/www/html
    <?php
    header('Content-Type: text/plain');
    foreach($_SERVER as $key=>$value) {
      if(substr($key, 0, 7) == 'MELLON_') {
        echo($key . '=' . $value . "\r\n");
      }
    }

    You can then go to:
    https://www.example.com/auth_mellon.php
    You should be redirected to the login page on the IdP. Login use the following credentials
    Username: demo
    Password: changeit
     After authentication, you should be redirected back to the original URL.
    • Manual login
    To start a login operation manually, you can use the mod_auth_mellon login endpoint.

    http://www.example.com/mellon/login?ReturnTo=/index.html

    The ReturnTo parameter is the URL the user should be sent to after logging in.
    • Logout 
    To start a logout operation, you need to send the user the mod_auth_mellon logout endpoint.

    http://www.example.com/mellon/logout?ReturnTo=/logged_out.html

    The ReturnTo parameter is the URL the user should be sent to after logging out.

    You should also remember that the user can be logged out by the IdP. To handle this, you should check that the user has a valid mod_auth_mellon session for each request. This can be done by checking whether the MELLON_NAME_ID variable is set

    Openam konek to wordpress


    http://blog.tirasa.net/wordpress-and-openam-saml-federation.html

    Wordpress and OpenAM SAML Federation

    Written by giacomolm
    In this small example, we will explore how to federate OpenAM credentials with Wordpress. As you can image, we will use OpenAM as SAML 2.0 identity provider and Wordpress as Service Provider, thus providing effective Single SignOn.
    The scenario is very intuitive: we have a Wordpress instance that we want to manage, and at the same time we have an OpenAM installation that acts as identity provider. We don't want unlinked accounts in different systems: for this reason we will benefits of the concept of federation.
    The image below synthesizes the whole flow. First of all, an User accesses Wordpress login page: the request is redirected immediately to the Identity Provider, with a SAML request. The identity provider elaborates the SAML request, and performs the User Authentication using a form. Once authenticated, the identity provider redirects a SAML response to the services provider. In our case the Wordpress plugin elaborates the request: if the user doesn't exist, it will be internally created. At the end of this phase, user is logged in.
     
    In order to proceed with this example, we will use an interesting plugin called SAML 2.0 Single Sign-On. You can download it from Wordpress website, or directly from the plugin page of Wordpress admin console. We will explore it later.
    1) Install OpenAM
    In our example we will use an embedded instance of openDJ. Moreover, we are using as main host www.example.com, resolved locally, in order to perform Single SignOn: the same host must be chosen during Wordpress installation.
    Other steps, like subject creation, can be performed in this early stage. Remember that you have to create also a group, that will be mapped with Wordpress roles.
    2) Install Wordpress
    After installation, in the plugins page, install SAML 2.0 Single Sign-On (you can search SAML string): we will configure it after.
    3) Now we have to configure OpenAM. First of all, we have to create a Circle Of Trust (COT). In order to do this, in the OpenAM home page click on Federation and after click new in the COT table.
    In this example we are referring to top realm (/), but you can refer to another one.
    4) Now go back to OpenAM home page. Click on “Create hosted identity provider” on the common tasks tab. Also in this case choose your realm (in our case \ ) Use the “Test” signing key.
    At the end click on Configure button. In this way we have created the hosted identity provider.
    5) Before creating the service provider, go back to Wordpress. Go under Settings and click on Single SignOn. In this page you will find your SP SAML information. For the moment copy the highlighted link
    The linked page contains the Service Provider metadata, that will be used by the IDP during authentication.
    6) Now, go back in OpenAM and click on the Common Tasks Tab. Then, click on “Register Remote Service Provider”. Select the your relam (in our case “/”): Choose URL radio. Add the URL that was copied from the Wordpress plugin. The circle of trust must be the same as the one that was created in the previous steps.
    If the meta-data URL is correct, OpenAM will show a popup windows confirming your configuration.
    7) Before configuring the remote service provider, we have to add an existing attribute in our datastore. This attribute is needed in order to map group attribute with Worpdpress roles. In our case, OpenDJ offers the isMemberOf attribute. All this information will be passed during SAML authentication. In order to do include this attribute, go under Access Control → <your realm> → Datastore → Embedded . Find the LDAP user attributes and add the 'isMemberOf' Attribute
    8) Now we can proceed with remote service provider configuration. This steps consists of specification of attribute mapping. The listed attribute will be included in the SAML response and will be used by the Service Provider.
    9) Now we are able to set the Wordpress plugin, In order to do this, we need some extra information that we can check by visiting our IdP configuration. In my case this is the link:
    http://www.example.com:8080/OpenAM-11.0.0/saml2/jsp/exportmetadata.jsp
    This page contains all the meta-data related to Identity Provider. Keep only the link in your clipboard.
    10) Open Wordpress plugin configuration Page. Go under Identity provider and paste the link in the Url Metadata textfield. Now click on fetch meta-data
    In this way we filled automatically the service provider info.
    11) Now we can fill Service Provider information. Don't forget to generate the key
     
    Now fill service provider information depending on your IdP attribute mapper (see step 8). In my case I have this configuration.
    In my OpenAM installation I have only the administrator group, that I mapped with the Administrator group name.
    12) Now open your favorite browser (better in a private session) and visit wordpress login: http://www.example.com/wordpress/wp-login.php. You will be redirected to OpenAM login page
     
    I used demo/changeit, an user belonging to administrator group. After click on login, you will have:

    Troubleshooting:
    You may have problems in accessing Wordpress. This is mainly due to two aspects: you possibly haven't specified any group for your OpenAM users or you haven't correctly set the attribute mapping. Moreover you might have to specify the mail attribute for OpenAM users: if you want to access Wordpress with your OpenAM account, you need to specify your email address

    Install Lamp ubuntu16.04

    Cara Install LAMP (Linux,Apache,Mariadb,PHP7) di Ubuntu 16.04

    cara install lamp di ubuntu, cara install lamp di ubuntu 16.04, installing lamp, cara install linux apache mariadb php7 di linux ubuntu 16.04
    LAMP (Linux, Apache, MySQL, PHP) adalah istilah yang umum digunakan untuk instalasi Apache + MySQL + PHP di Server Linux. Seiring perkembangan software, MySQL kini sudah digantikan dengan MariaDB sehingga istilah LAMP menjadi Linux Apache MariaDB PHP.
    Tutorial ini ditulis untuk digunakan oleh user non-root dengan menggunakan command line sudo di setiap perintah yang membutuhkan privilege root. Untuk user root, command line sudo bisa dihilangkan.
    Dalam tutorial ini, kami berasumsi bahwa Anda sudah memiliki server Linux Ubuntu 14.04 di PC anda atau di VPS anda. Jika Anda belum memiliki VPS, Anda bisa membelinya di link di bawah ini dengan harga yang sangat murah

    Langkah 1: Install Web Server Apache 2

    instalasi Apache webserver bisa dilakukan melalui perintah apt-get seperti dibawah ini:
    sudo apt-get install -y apache2
    
    cara install lamp di ubuntu 16.04, installing lamp, cara install linux apache mariadb php7 di linux ubuntu 16.04
    parameter -y menandakan jawaban y (yes) di setiap pertanyaan Yes / No
    setelah instalasi selesai, Anda bisa cek melalui browser dengan mengetikkan http://alamat-IP-VPS
    Misal jika IP VPS Anda 192.168.1.2, anda bisa ketikkan http://192.168.1.2
    Jika Instalasi berhasil, akan tampak hasil sebagai berikut:
    cara install apache 2.4 di linux ubuntu 14.04, vps tutorial

    Langkah 2: Install MariaDB

    MariaDB merupakan platform database yang dibuat oleh Developer MySQL. Semenjak MySQL di akuisisi oleh Oracle, para Developernya kemudian beralih membuat Platform Database baru yang memiliki banyak kelebihan dibanding MySQL. karena MariaDB merupakan Project lanjutan yang dibuat oleh developer MySQL, maka semua perintah dan syntax mySQL sepenuhnya compatible dengan MariaDB.
    Cara Install MariaDB cukup dengan mengetikkan Command Line berikut di terminal:
    sudo apt-get install -y mariadb-server mariadb-client
    
    cara install lamp di ubuntu 16.04, installing lamp, cara install linux apache mariadb php7 di linux ubuntu 16.04
    setelah instalasi selesai, jalankan MariaDB dengan mengetikkan perintah berikut:
    sudo service mysql start
    
    Kemudian, check status mariaDB dengan mengetikkan:
    sudo service mysql status
    
    dan hasilnya sebagai berikut:
    cara install mariaDB di Linux ubuntu
    kemudian, untuk pengamanan MySQL, ketikkan perintah berikut:
    sudo mysql_secure_installation
    
    Hasilnya adalah sebagai berikut:
    NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
          SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
    
    In order to log into MariaDB to secure it, we'll need the current
    password for the root user.  If you've just installed MariaDB, and
    you haven't set the root password yet, the password will be blank,
    so you should just press enter here.
    
    Enter current password for root (enter for none): 
    OK, successfully used password, moving on...
    
    Setting the root password ensures that nobody can log into the MariaDB
    root user without the proper authorisation.
    
    You already have a root password set, so you can safely answer 'n'.
    
    Change the root password? [Y/n] n
     ... skipping.
    
    By default, a MariaDB installation has an anonymous user, allowing anyone
    to log into MariaDB without having to have a user account created for
    them.  This is intended only for testing, and to make the installation
    go a bit smoother.  You should remove them before moving into a
    production environment.
    
    Remove anonymous users? [Y/n] y
     ... Success!
    
    Normally, root should only be allowed to connect from 'localhost'.  This
    ensures that someone cannot guess at the root password from the network.
    
    Disallow root login remotely? [Y/n] y
     ... Success!
    
    By default, MariaDB comes with a database named 'test' that anyone can
    access.  This is also intended only for testing, and should be removed
    before moving into a production environment.
    
    Remove test database and access to it? [Y/n] y
     - Dropping test database...
     ... Success!
     - Removing privileges on test database...
     ... Success!
    
    Reloading the privilege tables will ensure that all changes made so far
    will take effect immediately.
    
    Reload privilege tables now? [Y/n] y
     ... Success!
    
    Cleaning up...
    
    All done!  If you've completed all of the above steps, your MariaDB
    installation should now be secure.
    
    Thanks for using MariaDB!
    

    Langkah 3: Install PHP7

    untuk menginstall PHP, dapat dilakukan dengan menggunakan command line berikut:
    sudo apt-get install -y php libapache2-mod-php php-mcrypt php-mysql
    
    cara install lamp di ubuntu 16.04, installing lamp, cara install linux apache mariadb php7 di linux ubuntu 16.04
    Anda bisa check versi PHP yang terinstall dengan perintah:
    php -v
    
    Hasilnya sebagai berikut:
    cara install lamp di ubuntu 16.04, installing lamp, cara install linux apache mariadb php7 di linux ubuntu 16.04
    setelah proses instalasi selesai, restart Apache dengan perintah berikut:
    sudo service apache2 restart

    Install Lamp ubuntu14.04

    Cara Install LAMP di Ubuntu 14.04

    cara install lamp di ubuntu, cara install lamp di ubuntu 16.04, installing lamp, cara install linux apache mariadb php7 di linux ubuntu 16.04
    LAMP (Linux, Apache, MySQL, PHP) adalah istilah yang umum digunakan untuk instalasi Apache + MySQL + PHP di Server Linux. Seiring perkembangan software, MySQL kini sudah digantikan dengan MariaDB sehingga istilah LAMP menjadi Linux Apache MariaDB PHP.
    Tutorial ini ditulis untuk digunakan oleh user non-root dengan menggunakan command line sudo di setiap perintah yang membutuhkan privilege root. Untuk user root, command line sudo bisa dihilangkan.
    Dalam tutorial ini, kami berasumsi bahwa Anda sudah memiliki server Linux Ubuntu 14.04 di PC anda atau di VPS anda. Jika Anda belum memiliki VPS, Anda bisa membelinya di link di bawah ini dengan harga yang sangat murah

    Langkah 1: Install Web Server Apache 2

    instalasi Apache webserver bisa dilakukan melalui perintah apt-get seperti dibawah ini:
    sudo apt-get install -y apache2
    
    parameter -y menandakan jawaban y (yes) di setiap pertanyaan Yes / No
    setelah instalasi selesai, Anda bisa cek melalui browser dengan mengetikkan http://alamat-IP-VPS
    Misal jika IP VPS Anda 192.168.1.2, anda bisa ketikkan http://192.168.1.2
    Jika Instalasi berhasil, akan tampak hasil sebagai berikut:
    cara install apache 2.4 di linux ubuntu 14.04, vps tutorial

    Langkah 2: Install MariaDB

    MariaDB merupakan platform database yang dibuat oleh Developer MySQL. Semenjak MySQL di akuisisi oleh Oracle, para Developernya kemudian beralih membuat Platform Database baru yang memiliki banyak kelebihan dibanding MySQL. karena MariaDB merupakan Project lanjutan yang dibuat oleh developer MySQL, maka semua perintah dan syntax mySQL sepenuhnya compatible dengan MariaDB.
    Cara Install MariaDB cukup dengan mengetikkan Command Line berikut di terminal:
    sudo apt-get install -y mariadb-server mariadb-client
    
    setelah instalasi selesai, jalankan MariaDB dengan mengetikkan perintah berikut:
    sudo service mysql start
    
    Kemudian, check status mariaDB dengan mengetikkan:
    sudo service mysql status
    
    dan hasilnya sebagai berikut:
    cara install mariaDB di Linux ubuntu
    kemudian, untuk pengamanan MySQL, ketikkan perintah berikut:
    sudo mysql_secure_installation
    
    Hasilnya adalah sebagai berikut:
    NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
          SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
    
    In order to log into MariaDB to secure it, we'll need the current
    password for the root user.  If you've just installed MariaDB, and
    you haven't set the root password yet, the password will be blank,
    so you should just press enter here.
    
    Enter current password for root (enter for none): 
    OK, successfully used password, moving on...
    
    Setting the root password ensures that nobody can log into the MariaDB
    root user without the proper authorisation.
    
    You already have a root password set, so you can safely answer 'n'.
    
    Change the root password? [Y/n] n
     ... skipping.
    
    By default, a MariaDB installation has an anonymous user, allowing anyone
    to log into MariaDB without having to have a user account created for
    them.  This is intended only for testing, and to make the installation
    go a bit smoother.  You should remove them before moving into a
    production environment.
    
    Remove anonymous users? [Y/n] y
     ... Success!
    
    Normally, root should only be allowed to connect from 'localhost'.  This
    ensures that someone cannot guess at the root password from the network.
    
    Disallow root login remotely? [Y/n] y
     ... Success!
    
    By default, MariaDB comes with a database named 'test' that anyone can
    access.  This is also intended only for testing, and should be removed
    before moving into a production environment.
    
    Remove test database and access to it? [Y/n] y
     - Dropping test database...
     ... Success!
     - Removing privileges on test database...
     ... Success!
    
    Reloading the privilege tables will ensure that all changes made so far
    will take effect immediately.
    
    Reload privilege tables now? [Y/n] y
     ... Success!
    
    Cleaning up...
    
    All done!  If you've completed all of the above steps, your MariaDB
    installation should now be secure.
    
    Thanks for using MariaDB!
    

    Langkah 3: Install PHP

    untuk menginstall PHP, dapat dilakukan dengan menggunakan command line berikut:
    sudo apt-get install -y php5 php5-fpm libapache2-mod-php5
    
    setelah proses instalasi selesai, restart Apache dengan perintah berikut:
    sudo service apache2 restart

    Percepat loading website dg gzip

    Mempercepat loading Website dengan gzip compression

    Ada banyak cara dalam mempercepat server response time, salah satunya dengan menggunakan gzip compression. Tutorial kali ini diperuntukkan bagi sobat yang menggunakan hosting linux dengan server apache.
    Langkah-langkah yang diperlukan untuk meng-enable gzip compression adalah sebagai berikut:
    1. Buka folder root html Anda dengan Cpanel atau FTP Client. Folder root html biasanya ditempatkan di home/username/public_html.
    2. Cari file .htaccess
    3. tambahkan beberapa baris perintah berikut pada file .htaccess Anda:
      <ifModule mod_gzip.c>
      mod_gzip_on Yes
      mod_gzip_dechunk Yes
      mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
      mod_gzip_item_include handler ^cgi-script$
      mod_gzip_item_include mime ^text/.*
      mod_gzip_item_include mime ^application/x-javascript.*
      mod_gzip_item_exclude mime ^image/.*
      mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
      </ifModule> 
      # compress text, html, javascript, css, xml:
      AddOutputFilterByType DEFLATE text/plain
      AddOutputFilterByType DEFLATE text/html
      AddOutputFilterByType DEFLATE text/xml
      AddOutputFilterByType DEFLATE text/css
      AddOutputFilterByType DEFLATE application/xml
      AddOutputFilterByType DEFLATE application/xhtml+xml
      AddOutputFilterByType DEFLATE application/rss+xml
      AddOutputFilterByType DEFLATE application/javascript
      AddOutputFilterByType DEFLATE application/x-javascript
      AddType x-font/otf .otf
      AddType x-font/ttf .ttf
      AddType x-font/eot .eot
      AddType x-font/woff .woff
      AddType image/x-icon .ico
      AddType image/png .png
      AddType text/css .css
    4. Save .htaccess
    Selain untuk mempercepat server response time, cara ini juga sangat berguna untuk menunjang SEO website Anda karena salah satu kriteria SEO adalah response time dari web tersebut.
    Semoga Bermanfaat

    Copy file dng ssh

    Copy File antar Server via SSH dengan menggunakan perintah scp

    domain murah,cPanel web hosting, vps murah indonesia, reseller hosting, reseller domain, domain gratis
    Alasan utama melakukan proses copy antar server yaitu untuk menghemat waktu dan Quota internet kita. dengan cara copy file Antar server, maka Anda bisa melakukan transfer file tanpa harus download-upload ke PC Anda.
    Ada banyak cara untuk copy file antar server, salah satunya dengan menggunakan perintah scp.
    Sintaksis penulisan perintah ini adalah sebagai berikut :
    scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] 
        [-l limit] [-o ssh_option] [-P port] [-S program] 
        [[user@]host1:]file1 ...     [[user@]host2:]file2
    
    untuk mengcopy banyak file dalam folder tertentu, maka langkahnya adalah sebagai berikut:
    1. Lakukan kompresi folder.
    Lihat artikel saya dengan judul Cara compress directory linux via SSH. Misal Hasil kompressi folder yang akan anda transfer anda beri nama websaya.tar.gz
    2. Copy hasil kompresi dengan scp
    Untuk mengcopy file, gunakan perintah berikut:
    scp /home/namaakunsumber/public_html/webku.tar.gz user@server3:/home/namaakuntujuan/public_html/
    
    Default port SSH adalah menggunakan port 22. Jika server anda masih tersetting dengan menggunakan port ini, maka pilihan nomor port tidak perlu digunakan