PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. PHP intro whatis.
Install Nginx and PHP-FPM:
sudo apt update && sudo apt install nginx php-fpm -y
Find PHP socket file:
user@localhost:~$ file /var/run/php/php8.2-fpm.sock
/var/run/php/php8.2-fpm.sock: socket
Create directory for project:
sudo mkdir -p /var/www/your-project
Create "index.php" file in&…
How to share internet via iptables? You need
hardware (e. g. workstation) with two network interface cards (NIC).
They are may be wired or wireless. It doesn't matter.
Names of your NICs you may see via "ip a" or "ifconfig" command.
For this example we named their "eth0" and "eth1":
- eth0 = the network adapter with internet (external or WAN).
- eth1 = the network adapter to which a second computer is attached (internal or LAN).
192.168.0.x = IP subnet for eth1.
But first we need enable packet fo…
When managing a Django application, particularly during development or testing, developers often need to clear all data from a model. A common method is to use MyModel.objects.all().delete(). However, this presents a common frustration: the next record created does not start with an ID of 1. Instead, it continues from the last known value of the sequence.
This behavior occurs because executing a DELETE statement on a table does not reset the underlying autoincrement sequence ge…
Docker is good solution when you want to fast deploying your applications and run in different operating systems. You don't need to install your application's runtime anywhere. Just install Docker and run anything you want. Docker build image for your application with all dependencies inside.
In this tutorial I show you how to create new Java application and run it in Docker.
Start with creating directory for project:
mkdir myproject && cd myproject
Create "Main.java" file with this code:
cl…
If you don't set static IP in Ubuntu Server's installer he trying receive IP by DHCP protocol.
Ethernet interfaces are identified by the system using predictable network interface names. These names can appear as eno1 or enp0s25. However, in some cases an interface may still use the kernel eth# style of naming. Documentation.
# Detecting interfaces
Use "ip address" or "ip a" command for finding your network interfaces:
user@localhost:~$ ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 q…
Configuring a static IP address is a fundamental task for any server administrator. A predictable IP address is essential for services, network shares, and remote access. While Debian's installer typically defaults to DHCP, setting a static IP is straightforward.
This guide covers two primary methods: the modern systemd-networkd approach (default in many minimal installs and other distributions) and the traditional "legacy" method using the /etc/network/interfaces file.
Before y…

What is CRON? Unix-like operating systems provide utility for run periodical tasks. For example you need to run script every day at 08:00 AM. CRON read tasks from configuration file line by line and have special syntax.
Windows have their own tool named as "Windows Task Scheduler".
Open terminal and run "crontab -e" command. When you open crontab first time, you must choose editor, which is convenient for your use. Enter number of preferred editor and press "Enter":
user@localhost:~$ crontab -e
no …
In computing, netstat (network statistics) is a command-line network utility that displays network connections for Transmission Control Protocol (both incoming and outgoing), routing tables, and a number of network interface (network interface controller or software-defined network interface) and network protocol statistics. Wikipedia.
Installation in Debian-like systems (Ubuntu, Kali Linux, ParrotSec OS, etc...):
sudo apt install net-tools -y
Display all sockets (default: connected):
netstat -a | …
Docker Compose is a tool for defining and running multi-container applications. It is the key to unlocking a streamlined and efficient development and deployment experience.
Compose simplifies the control of your entire application stack, making it easy to manage services, networks, and volumes in a single, comprehensible YAML configuration file. Then, with a single command, you create and start all the services from your configuration file.
Compose works in all environments; production, …
A container is an isolated environment for your code. This means that a container has no knowledge of your operating system, or your files. It runs on the environment provided to you by Docker Desktop. Containers have everything that your code needs in order to run, down to a base operating system. You can use Docker Desktop to manage and explore your containers. Official documentation.
This article - popular docker commands collection.
If you need to show subcommands list you may…