https://www.liquidweb.com/kb/how-to-install-and-use-apachetop/
disable password on server
By default
PasswordAuthentication is set to yes, so explicitly commenting it in /etc/ssh/sshd_config and restart sshd has no effect.You’ll need to explicitly set PasswordAuthentication no to allow only Public Key Authentication.
service ssh restart
https://askubuntu.com/questions/346857/how-do-i-force-ssh-to-only-allow-users-with-a-key-to-log-in
check ram
logrotate
logrotate /etc/logrotate.d/your-logrotate-config https://unix.stackexchange.com/questions/116136/how-to-make-log-rotate-change-take-effect/116138 https://www.2daygeek.com/configure-logrotate-manage-linux-log-files/
smarty escape html
{$diamond.cert_html nofilter}
register hook if not registered
if (!$this->isRegisteredInHook('someHook'))
$this->registerHook('someHook');
Webserver as owner (the way most people do it, and the Laravel doc’s way)
711:answer https://stackoverflow.com/questions/30639174/how-to-set-up-file-permissions-for-laravel
* sudo chown -R www-data:www-data /path/to/your/laravel/root/directory
* sudo usermod -a -G www-data ubuntu
* sudo find /path/to/your/laravel/root/directory -type f -exec chmod 644 {} \;
* sudo find /path/to/your/laravel/root/directory -type d -exec chmod 755 {} \;
* cd /var/www/html/laravel >> assuming this is your current root directory
* sudo chown -R $USER:www-data .
* sudo find . -type f -exec chmod 664 {} \;
* sudo find . -type d -exec chmod 775 {} \;
* sudo chgrp -R www-data storage bootstrap/cache
* sudo chmod -R ug+rwx storage bootstrap/cache
max_connections
* phpmyadmin -> Variables -> max_connections
create user only for ftp + vsftpd
1. sudo useradd -d /home/customuser/customdir username 2. passwd username 3. usermod -s /bin/false username 4. chown username:username filename --------------------------------------- pavyko su siuo tutorialu (atlikus viska is eiles) https://www.digitalocean.com/community/tutorials/how-to-set-up-vsftpd-for-a-user-s-directory-on-ubuntu-18-04 --------------------------------------- vsftpd.conf (veikiantis is pvz) papildytas su: allow_writeable_chroot=YES force_dot_files=YES listen=NO listen_ipv6=YES anonymous_enable=NO local_enable=YES write_enable=YES dirmessage_enable=YES use_localtime=YES xferlog_enable=YES connect_from_port_20=YES chroot_local_user=YES user_sub_token=$USER local_root=/home/$USER/ftp allow_writeable_chroot=YES force_dot_files=YES pasv_min_port=40000 pasv_max_port=50000 userlist_enable=YES userlist_file=/etc/vsftpd.userlist userlist_deny=NO secure_chroot_dir=/var/run/vsftpd/empty pam_service_name=vsftpd rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key ssl_enable=NO
grep
grep 'word' filename grep -rnw '/path/to/somewhere/' -e 'text_to_find' -r or -R is recursive, -n is line number, and -w stands for match the whole word. https://stackoverflow.com/questions/16956810/how-do-i-find-all-files-containing-specific-text-on-linux