Panduan Instalasi Sertifikat Let's Encrypt (Produksi) untuk Apache (XAMPP/Linux) Langkah 1

 🔐 Panduan Instalasi Sertifikat Let's Encrypt (Produksi) untuk Apache (XAMPP/Linux)
Langkah 1: Install Certbot


sudo apt update
sudo apt install certbot python3-certbot-apache

Langkah 2: Dapatkan Sertifikat Let's Encrypt


sudo certbot certonly --manual --preferred-challenges dns -d sub.domain.com

Ikuti instruksi yang muncul. Anda akan diminta menambahkan DNS TXT record:

    Name:

_acme-challenge.sub.domain.com.

Type:

TXT

Value (contoh dari certbot):

    7F4rb3Oz1BrAemrhDDHJGcIlItYc9kXcJRnAVhebLog

🕒 Tunggu propagasi DNS, lalu verifikasi TXT record sudah aktif menggunakan Google Admin Toolbox

Jika berhasil, Anda akan melihat pesan:

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/sub.domain.com/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/sub.domain.com/privkey.pem

⚠️ Catatan

    Sertifikat manual tidak diperpanjang otomatis.

    Untuk perpanjangan, ulangi perintah certbot dan proses DNS challenge.

Langkah 3: Konfigurasi Apache (XAMPP)


Contoh konfigurasi VirtualHost SSL:

Edit file:

sudo nano /opt/lampp/etc/extra/httpd-ssl.conf

Tambahkan atau sesuaikan:

<VirtualHost *:443>
    ServerName sub.domain.com
    DocumentRoot "/opt/lampp/htdocs/subdomain"

    SSLEngine on
    SSLCertificateFile "/etc/letsencrypt/live/sub.domain.com/fullchain.pem"
    SSLCertificateKeyFile "/etc/letsencrypt/live/sub.domain.com/privkey.pem"

    <Directory "/opt/lampp/htdocs/subdomain">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName sub.domain.com
    Redirect permanent / https://sub.domain.com/
</VirtualHost>

Langkah 4: Aktifkan Modul SSL Apache


Edit file:

sudo nano /opt/lampp/etc/httpd.conf

Pastikan baris berikut tidak dikomentari (tidak diawali #):

LoadModule ssl_module modules/mod_ssl.so
Include etc/extra/httpd-ssl.conf

Langkah 5: Restart Apache


sudo /opt/lampp/lampp restart

Langkah 6: Uji Sertifikat


Buka browser dan akses:

https://sub.domain.com

Jika menggunakan sertifikat valid dari Let's Encrypt, tidak akan ada peringatan keamanan dari browser.

cloudflared tunnel on ubuntu

 Berikut tutorial pembuatan Cloudflare Tunnel step-by-step lengkap dengan gambar dari tangkapan layar Anda, untuk pemahaman yang praktis dan rapi:
1️⃣ Login ke Cloudflare Dashboard

    Akses: https://dash.cloudflare.com/

    Masuk menggunakan akun email Anda.

    Pilih akun yang akan digunakan untuk tunnel.

2️⃣ Masuk ke menu Zero Trust → Tunnels

    Klik Zero Trust di sidebar.

    Pilih Networks → Tunnels.

    Anda akan melihat daftar tunnel aktif dan tidak aktif.

3️⃣ Klik Create a Tunnel

    Klik tombol + Create a tunnel.

4️⃣ Pilih metode koneksi tunnel

    Pilih Cloudflared (Recommended).

    Klik Select Cloudflared.

5️⃣ Ikuti instruksi instalasi Cloudflared

Jika belum menginstall cloudflared:

# Tambah GPG key
sudo mkdir -p --mode=0755 /usr/share/keyrings
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null

# Tambah repository
echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared any main' | sudo tee /etc/apt/sources.list.d/cloudflared.list

# Update dan install
sudo apt-get update

sudo apt-get install cloudflared

6️⃣ Jalankan tunnel dengan token

Setelah cloudflared terinstall, Anda bisa:

    Jalankan otomatis saat boot:

sudo cloudflared service install <TOKEN_YANG_DISEDIAKAN>

    Atau jalankan manual:

cloudflared tunnel run --token <TOKEN_YANG_DISEDIAKAN>


Token didapat dari tampilan pembuatan tunnel.
7️⃣ Tunnel berhasil dibuat

Tunnel Anda akan muncul di daftar dengan status HEALTHY jika berjalan normal.

8️⃣ Konfigurasi Routes

Jika ingin mengarahkan domain ke server lokal Anda:

    Klik Configure pada tunnel.

    Tambahkan Public Hostname sesuai domain/subdomain dan arahkan ke port lokal server Anda (misal port 80/443).

    Simpan konfigurasi.

 

Gunakan systemctl status cloudflared untuk memeriksa status tunnel jika menggunakan service.

Livewire upload file error ketika production http ke https

Ringkasan ini tidak tersedia. Harap klik di sini untuk melihat postingan.

Livewire Error The Command PDF To text Upload file / Library ini adalah wrapper PHP untuk binary pdftotext dari Poppler, berfungsi untuk mengubah file PDF menjadi teks secara akurat dan cepat.

 


📌 Upload PDF dan Konversi ke Teks di Laravel Livewire

1️⃣ Install library


composer require spatie/pdf-to-text

Install pdftotext di server:

    Ubuntu/Debian:


sudo apt-get install poppler-utils

CentOS:


sudo yum install poppler-utils

macOS:


    brew install poppler

2️⃣ Buat Livewire Component


php artisan make:livewire UploadPdfText

3️⃣ Edit UploadPdfText.php

<?php

namespace App\Http\Livewire;

use Livewire\Component;
use Livewire\WithFileUploads;
use Spatie\PdfToText\Pdf;

class UploadPdfText extends Component
{
    use WithFileUploads;

    public $file;
    public $parsedText;

    public function parsePdf()
    {
        $this->validate([
            'file' => 'required|file|mimes:pdf|max:20480', // Max 20MB
        ]);

        $path = $this->file->getRealPath();
        $text = Pdf::getText($path);

        $this->parsedText = $text;
    }

    public function render()
    {
        return view('livewire.upload-pdf-text');
    }
}

4️⃣ Buat upload-pdf-text.blade.php


<div class="p-6 bg-white border rounded shadow">
    <h2 class="text-lg font-semibold mb-4">Upload PDF dan Konversi ke Teks</h2>

    <input type="file" wire:model="file" accept="application/pdf" class="mb-2">
    <div wire:loading wire:target="file">Mengupload...</div>

    <button wire:click="parsePdf"
        class="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600">Proses PDF</button>

    @if ($parsedText)
        <div class="mt-4">
            <h3 class="font-semibold mb-2">Hasil Teks:</h3>
            <pre class="p-2 bg-gray-100 rounded max-h-[400px] overflow-auto text-sm">{{ $parsedText }}</pre>
        </div>
    @endif
</div>

5️⃣ Tambahkan ke Route atau Blade


Di halaman Blade:

@livewire('upload-pdf-text')

Atau route untuk testing:

Route::get('/upload-pdf', function () {
    return view('pdf-upload-page'); // berisi @livewire di atas
});

✅ Hasil


🔹 User upload file PDF.
🔹 Tekan tombol Proses PDF.
🔹 Teks dari PDF akan ditampilkan di layar, siap untuk di-copy atau disimpan ke DB.

JIKA TERJADI ERROR DAN BERMASALAH DENGAN /usr/bin/pdftotext

 Direkomendasikan: Gunakan Wrapper Script

Buat shell script kecil untuk membungkus pdftotext dengan LD_LIBRARY_PATH kosong, lalu arahkan Spatie ke script ini.
📁 Langkah-langkah:
1. Buat file /usr/local/bin/pdftotext-wrapper

Isi file dengan:

#!/bin/bash
LD_LIBRARY_PATH= /usr/bin/pdftotext "$@"

2. Jadikan script bisa dieksekusi:

chmod +x /usr/local/bin/pdftotext-wrapper

3. Ubah kode PHP:

use Spatie\PdfToText\Pdf;

$text = Pdf::getText('/path/to/file.pdf', '/usr/local/bin/pdftotext-wrapper');

🔚 Kesimpulan:

    LD_LIBRARY_PATH harus dikosongkan, jadi gunakan LD_LIBRARY_PATH=

    Tapi karena Pdf::getText() tidak mendukung parameter ketiga, kamu tidak bisa langsung menyetel env di situ

    Solusi paling bersih: Gunakan wrapper script yang menyetel env kosong, lalu arahkan Pdf::getText() ke script itu 






Resize an UNDO tablespace Oracle 10g

1.

sqlplus SYS AS SYSDBA

2.

SELECT file_name, tablespace_name, bytes/1024/1024 UNDO_SIZE_MB, SUM(bytes/1024/1024) OVER() TOTAL_UNDO_SIZE_MB FROM dba_data_files d WHERE EXISTS (SELECT 1 FROM v$parameter p WHERE LOWER (p.name)='undo_tablespace' AND p.value=d.tablespace_name);

3.
alter database datafile '/oracle/ora10g/ecms/syscom01.dbf' resize 4G;


Note: It is not recommended to grow any data files above 20 GB in size. If a tablespace needs to be grown over 20 GB a new datafile has to be added.



source  : https://www.ibm.com/docs/en/tnpm/1.4.4?topic=administration-resize-undo-tablespace


https://forums.oracle.com/ords/apexds/post/resize-datafile-5440

How to increase PROCESSES initialization parameter. ORA-00020 maximum number of processes exceeded..

 ORA-00020 maximum number of processes exceeded

Cause: All process state objects are in use.

Action: Increase the value of the PROCESSES initialization parameter.


ORA-00020 comes under "Oracle Database Server Messages". These messages are generated by the Oracle database server when running any Oracle program.



1.   Login as sysdba

   sqlplus / as sysdba

   

2. Check Current Setting of Parameters

   sql> show parameter sessions;

   sql> show parameter processes;

   sql> show parameter transactions;


3.   If you are planning to increase "PROCESSES" parameter you should also plan to increase "sessions and "transactions" parameters

   A basic formula for determining these parameter values is as follows:

   

      processes=x

      sessions=x*1.1+5

      transactions=sessions*1.1

      

4.   These paramters can't be modified in memory. You have to modify the spfile only (scope=spfile) and bounce the instance.

   sql> alter system set processes=500 scope=spfile;

   sql> alter system set sessions=555 scope=spfile;

   sql> alter system set transactions=610 scope=spfile;

   sql> shutdown abort
   sql> startup



#source : https://www.linkedin.com/pulse/how-increase-processes-initialization-parameter-ora-00020-jain