diff --git a/README.md b/README.md index ac98e9e..32903f0 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ * SSL yang digunakan ialah SSL dari CloudFlare ## Langkah 1 Instalasi dan Konfigurasi LEMP -### Step 1: Instalasi Web Server Nginx +#### Step 1: Instalasi Web Server Nginx Untuk melakukan instalasi Nginx yang pertama adalah melakukan remote ke IP VPS dengan menggunakan SSH @@ -60,7 +60,7 @@ └─10902 nginx: worker process``` -### Step 2: Instalasi Database Server MariaDB 10.1.44 +#### Step 2: Instalasi Database Server MariaDB 10.1.44 Setelah webserver Nginx telah diinstall selanjutnya lakukan instalasi database server mariaDB 10.1.44 dan langkah pertama ialah menambahkan repository untuk mariaDB. @@ -107,7 +107,7 @@ └─29897 /usr/sbin/mysqld ``` -### Step 3: Instalasi PHP 7.2 +#### Step 3: Instalasi PHP 7.2 Setelah melakukan instalasi database server selanjutnya ialah install PHP versi 7.2 dan langkah pertama adalah mengambil dan menginstall repository untuk PHP versi 7 keatas. @@ -133,7 +133,7 @@ ``` ## Langkah 2 Konfigurasi CMS wordpress -### Step 1: Membuat folder untuk meletakan root folder CMS wordpress +#### Step 1: Membuat folder untuk meletakan root folder CMS wordpress > ``` # cd /home @@ -144,7 +144,7 @@ Folder untuk mendownload dan menyimpan folder dan file CMS Wordperss -### Step 2: Download dan Extract File CMS Wordpress +#### Step 2: Download dan Extract File CMS Wordpress Setelah folder untuk CMS wordpress selesai dibuat, selanjutnya adalah melakukan instalasi wget dan unzip . @@ -165,10 +165,83 @@ # chmod -R 755 /home/A/ ``` -### Step 3: Konfigurasi File PHP dan menetukan PHP socket +#### Step 3: Konfigurasi File PHP dan menetukan PHP socket > ```# vi /etc/php-fpm.d/www.conf``` Rubah user dan grub menjadi nginx dan buat php socket -![GitHub Logo](http://url-Anda.com) +![GitHub Logo](https://manan.s3-id-jkt-1.kilatstorage.id/gambar/user.png) + + +#### Step 4: Konfigurasi Server Blok untuk CMS Wordpress + +Buat file baru dengan nama _wp.conf_ + +> ```# vi /etc/nginx/conf.d/wp.conf``` + +Di dalam file _wp.conf_ masukan kode berikut + +> ``` +server { + listen 80; + listen [::]:80; + server_name wp.padiakse.my.id www.wp.padiakse.my.id; + return 302 https://$server_name$request_uri; +} +server { + # SSL configuration + listen 443 ssl http2; + listen [::]:443 ssl http2; + ssl on; + ssl_certificate /etc/ssl/certs/cert.pem; + ssl_certificate_key /etc/ssl/private/key.pem; + server_name wp.padiakse.my.id www.wp.padiakse.my.id; + root /home/A/wordpress/; + index index.html index.php ; + error_log /var/log/nginx/wppadiakse-error.log; + access_log /var/log/nginx/wppadiakse-access.log; + location / { + try_files $uri $uri/ =404; + } +location ~ \.php$ { + try_files $uri =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini + # With php5-cgi alone: + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name; + include fastcgi_params; +} +} +``` + +Seve dan close + +#### Step 5: Buat database baru, edit wp-config dan login ke akun CloudFlare + +Pertama buat database baru pada mariaDB + +> ```# mysql -u root -p``` + +Setelah masuk tambahkan database baru dengan nama _wp_ / **isikan bebas sesuai kebutuhan** + +> ```MariaDB [(none)]> create database nama_database;``` + +Masukan user dan password untuk database _wp_ + +> ```MariaDB [(none)]> GRANT ALL ON nama_database.* TO 'isikan_user'@'localhost' IDENTIFIED BY 'isikan_password';``` + +Beri hak akses untuk database yang dipilih + +> ```MariaDB [(none)]> FLUSH PRIVILEGES;``` + +Exit untuk keluar dari MariaDB + +> ```MariaDB [(none)]> exit;``` + +Kemudian masuk ke folder wordpress + +> ```# cd /home/A/wordpress```