Results: 30
reload nginx
Reloads
nginx
server to apply changes
sudo systemctl reload nginx
run queries
We can run queries (that are inside
queries
file) from Linux command line
mysql -u test_user -p test_db < /var/www/queries.sql
The queries inside the file will be run into
test_db
using
test_user
user. Note: The above command can be used to restore database, or add some tables, or insert some rows.
change password for MySQL root user
Changes password for MySQL
root
user to
some password
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'some password';
set password for MySQL root user
We run the command after installing
mysql-server
to set password for the
root
user
sudo mysql_secure_installation
After the command is executed, we enter the password for the MySQL root user
ufw allow 'Nginx HTTP'
Allows HTTP for Nginx server
sudo ufw allow 'Nginx HTTP'
apt install
Installs
Git
on the server
sudo apt install git
Installs Nginx server
sudo apt install nginx
Installs MySQL Server
sudo apt install mysql-server
Installs php-fpm and php-mysql
sudo apt install php-fpm php-mysql
Installs additional necessary packages for PHP
sudo apt install php-pdo php-common php-dom php-mbstring php-gd php-json php-soap php-xml php-cli php-ldap php-zip
apt update
The command gets information from the Internet about updated packages
sudo apt update
create directory
Creates
testdirectory
directory to the location that the console is pointing at
sudo mkdir testdirectory
Gives permission to
services_cron/asb/log
to create files and write logs
sudo chmod -R 757 /var/www/html/services_cron/asb/log
First,
headers
and
expires
modules must be enabled on the server:
sudo a2enmod headers 
sudo a2enmod expires
After that the server must be restarted:
service apache2 restart
Then it will work if
.htaccess
contains the following:
# for enabling browser caching
<filesMatch ".(css|jpg|jpeg|png|gif|js|ico)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
Results: 30