Create a Self-Signed SSL Certificate for Apache in Ubuntu 22.04

Ref: https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-apache-in-ubuntu-22-04

1. open up the firewall ufw for the http and https ports:
[codesyntax lang=”bash”]

[/codesyntax]

2. enable mod_ssl
[codesyntax lang=”bash”]

[/codesyntax]

3. Creating the TLS Certificate
[codesyntax lang=”bash”]

[/codesyntax]

4. Configuring Apache to Use TLS
[codesyntax lang=”bash”]

[/codesyntax]

the config file like this
[codesyntax lang=”php”]

[/codesyntax]
don’t forget to reload/restart apache2 service

5. Now load your site in a browser, being sure to use https:// at the beginning.

You should see an error. This is normal for a self-signed certificate! The browser is warning you that it can’t verify the identity of the server, because our certificate is not signed by any of its known certificate authorities. For testing purposes and personal use this can be fine. You should be able to click through to advanced or more information and choose to proceed.

Install xdebug with PHP 8.2 on Ubuntu 22.04

<OLD>Ref: https://gist.github.com/henryonsoftware/066d8282daaf8c2ae281ce010e3e5404

1. Download xdebug source code from https://github.com/xdebug/xdebug/releases
for example the xdebug 3.3.2 from https://github.com/xdebug/xdebug/archive/refs/tags/3.3.2.tar.gz

2. extract the downloaded file
satria@teddy:~$ cd Downloads/
satria@teddy:~/Downloads$ tar -xvzf xdebug-3.3.2.tar.gz

3. run ‘phpize’
satria@teddy:~/Downloads$ cd xdebug-3.3.2/
satria@teddy:~/Downloads/xdebug-3.3.2$ phpize
Configuring for:
PHP Api Version: 20210902
Zend Module Api No: 20210902
Zend Extension Api No: 420210902
configure.ac:165: warning: The macro `AC_PROG_LIBTOOL’ is obsolete.
configure.ac:165: You should run autoupdate.
build/libtool.m4:99: AC_PROG_LIBTOOL is expanded from…
configure.ac:165: the top level

4. run ‘./configure’
satria@teddy:~/Downloads/xdebug-3.3.2$ ./configure

5. run ‘make’
satria@teddy:~/Downloads/xdebug-3.3.2$ make

6. copy the module xdebug.so to php lib 20210902
</OLD>
<NEW>

Use php from repository ppa:ondrej/php
then install php8.2-dev
[codesyntax lang=”php”]

[/codesyntax]

then install php8.2-xdebug
[codesyntax lang=”php”]

[/codesyntax]

check the php version
[codesyntax lang=”php”]

[/codesyntax]

if not php8.2, you can select it by using
[codesyntax lang=”php”]

[/codesyntax]

CONFIG XDEBUG

SETTING