NGINX Nginx – file path encryption There was a task to set up encryption in the links of paths to media files for placing movies on the site. We use nginx for this: rewrite /([a-zA-Z0-9_\-]+)/([0-9]+)/(.+)\.mp4$ /$3.mp4?md5=$1&time=$2; location / { secure_link $arg_md5,$arg_time; secure_link_md5 SECRET_
MySQL Create MySQL Database Connect to the MySQL server from the command line as root: mysql -u root -p Create MySQL Database Use the following syntax to create a database in MySQL: CREATE DATABASE name_base; Create a new user: GRANT ALL PRIVILEGES ON name_base.* TO name_user@localhost IDENTIFIED BY 'PASSWORD&
Bash Example bash script fro status server and website Here is an example of a simple bash script that can be used to check the status of a server: #!/bin/bash # Define the server address server=http://example.com # Use the curl command to check the server's HTTP response code response=$(curl -s -o /dev/null -w