General Installation

apt-get update --allow-releaseinfo-change
apt-get install --reinstall ca-certificates
apt-get upgrade -y
apt-get install nano wget perl sudo -y
sudo apt -y dist-upgrade
sudo apt --purge autoremove
sudo apt update && sudo apt upgrade
apt -y purge Apache2* bind* exim ufw

If want ufw;

apt install ufw -y
ufw allow http
ufw allow https
ufw allow ssh
ufw enable
ufw reload

Apache2

apt install -y apache2 apache2-utils
systemctl status apache2
mkdir /var/www/dallas
nano /var/www/dallas/index.php
chown -R www-data: /var/www/dallas/

Create own Apache virtualhost config to server your site;
#nano /etc/apache2/sites-available/dallas.conf

   <VirtualHost *:80>
    ServerName dallas.riverfire.net
    DocumentRoot /var/www/dallas
    <Directory /var/www/dallas>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/mywebsite_error.log
    CustomLog ${APACHE_LOG_DIR}/mywebsite_access.log combined
</VirtualHost>

$ apachectl -t
 --Syntax OK
$ a2ensite dallas.conf
$ a2dissite 000-default.conf  **//Very Important to do this!**
$ systemctl reload apache2
$ systemctl enable apache2
$ systemctl restart apache2
http://domain-name.

Mysql Installation

$ apt install -y mariadb-server mariadb-client
$ systemctl status mariadb
$ mysql_secure_installation
 Set root password
 Remove anonymous users.
 Disable remote login for root user.
 Remove test database and access to it.

$ mysql -u root -p --Enter password:

     Maria DB [(none)]>
     CREATE DATABASE crunch; 
     CREATE USER 'crunch'@localhost IDENTIFIED BY 'password';
       (check its status by entering: SELECT User FROM mysql.user;)

     GRANT ALL PRIVILEGES ON *.* TO 'crunch'@localhost IDENTIFIED  BY 'password';
       (GRANT ALL PRIVILEGES ON 'crunch'.* TO 'crunch'@localhost;) 

     FLUSH PRIVILEGES;
     SHOW GRANTS FOR 'crunch'@localhost; 
    SHOW DATABASES;
    Exit

DROP USER 'crunch'@localhost;

PHP Installation

sudo apt -y install php libapache2-mod-php php-mysql php-fpm
apt -y install libmcrypt-dev libreadline-dev mcrypt php-pear libapache2-mod-fcgid
sudo apt -y install software-properties-common
sudo apt -y install php-common php-mysql php-xml php-xmlrpc php-curl php-gd php-imagick php-cli
sudo apt -y install php-imap php-mbstring php-opcache php-soap php-dev php-cgi php-zip php-intl
sudo apt -y install php-mcrypt php-pdo php-json php-simplexml php-bcmath php-snmp php-pspell 
sudo apt -y install php-enchant php-pear php-tidy unzip gcc php-ldap php-gmp
sudo apt autoremove
php -v
sudo nano /etc/php8.2/fpm/php.ini
    Uncomment cgi.fix_pathinfo and set it to "0". 
    This is a security fix to disable PHP from finding the closes file if no match is found.
       cgi.fix_pathinfo=0
    Restart PHP Processor
$ sudo service php5-fpm restart

PHP MyAdmin

$ wget -P Downloads https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-english.tar.gz
wget -P Downloads https://files.phpmyadmin.net/phpmyadmin.keyring

cd Downloads
gpg --import phpmyadmin.keyring
wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-english.tar.gz.asc
gpg --verify phpMyAdmin-latest-english.tar.gz.asc

sudo mkdir /var/www/crunch/phpMyAdmin
sudo tar xvf phpMyAdmin-latest-english.tar.gz --strip-components=1 -C /var/www/html/crunch/phpmyadmin
sudo cp /var/www/html/crunch/phpmyadmin/config.sample.inc.php /var/www/html/crunch/phpmyadmin/config.inc.php
sudo nano /var/www/html/crunch/phpmyadmin/config.inc.php
  set blowfish passwd
sudo chmod 660 /var/www/html/crunch/phpmyadmin/config.inc.php
sudo chown -R www-data:www-data /var/www/html/crunch/phpmyadmin
sudo systemctl restart apache2

Webmin

sudo apt -y install curl
curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh
sh setup-repos.sh
apt -y install webmin --install-recommends