×
Clear all filters including search bar
Valeri Tandilashvili's Linux Notes
nginx server to apply changessudo systemctl reload nginxqueries file) from Linux command linemysql -u test_user -p test_db < /var/www/queries.sqlThe 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.root user to some password ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'some password';mysql-server to set password for the root usersudo mysql_secure_installationAfter the command is executed, we enter the password for the MySQL root usersudo ufw allow 'Nginx HTTP'Git on the serversudo apt install git
Installs Nginx serversudo apt install nginx
Installs MySQL Serversudo apt install mysql-server
Installs php-fpm and php-mysqlsudo apt install php-fpm php-mysql
Installs additional necessary packages for PHPsudo apt install php-pdo php-common php-dom php-mbstring php-gd php-json php-soap php-xml php-cli php-ldap php-zipsudo apt updatetestdirectory directory to the location that the console is pointing atsudo mkdir testdirectoryservices_cron/asb/log to create files and write logssudo chmod -R 757 /var/www/html/services_cron/asb/logheaders 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>