Add a custom log format in your nginx.conf: log_format cf_custom ‘$remote_addr – $remote_user [$time_local] ‘ ‘”$request” $status $body_bytes_sent ‘ ‘”$http_referer” “$http_user_agent” ‘ ‘$http_cf_ray’; Set real visitor IPs in your site(s) vhost config mysite.conf: set_real_ip_from 103.21.244.0/22; set_real_ip_from 103.22.200.0/22; set_real_ip_from 103.31.4.0/22; set_real_ip_from 104.16.0.0/12; set_real_ip_from 108.162.192.0/18; set_real_ip_from 131.0.72.0/22; set_real_ip_from 141.101.64.0/18; set_real_ip_from 162.158.0.0/15; set_real_ip_from 172.64.0.0/13; set_real_ip_from 173.245.48.0/20; set_real_ip_from 188.114.96.0/20; ..
In the boot grub menu select option to edit. Select Option to edit (e). Go to the line of Linux 16 and change ro with rw init=/sysroot/bin/sh. rw init=/sysroot/bin/sh Now press Control+x to start on single user mode. Now access the system with this command. chroot /sysroot Reset the password. passwd root Update selinux information ..
# vi /etc/systemd/system/my_service.service [Unit] Description=Service Description After=network.target [Service] Type=simple ExecStart=/path/to/executable TimeoutStartSec=0 [Install] WantedBy=default.target systemctl dae..
/usr/bin/vhd-util coalesce –debug -n /var/run/sr-mount/<SR-ID>/<n..
Can’t believe I have to write this down. I keep forgetting!! sed -i ‘s/he said/she said/g’ ..
Identify mount point e.g. via /etc/fstab Find systemd unit (see below) Add the found mount-unit to the After= statement in the *.service file (see below) systemctl list-units | grep ‘/path/to/mount’ | awk ‘{ print $1 }’ path-to-mount.mount vi /etc/systemd/system/php-fpm.service [Unit] Description=The PHP FastCGI Process Manager After=syslog.target network.target path-to-m..
No idea how I’ve never needed to use this before, check out the reboot Last system reboot time/date # who -b system boot 2018-12-20 08:11 History of Reboots # last reboo..
Pretty decent quick grab for useful data System Information dmidecode -t system Chassis Information dmidecode -t chassis BIOS Information dmideco..
Install Composer cd /tmp curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer Install Magento using composer composer create-project –repository-url=https://repo.magento.com/ magento/project-community-edition . composer create-project –repository=https://repo.magento.com/ magento/project-community-edition=2.3.* –stability=beta Clear Cache rm -rf var/cache/* php bin/magento cache:clean php bin/magento cache:flush Set URL php bin/magento setup:store-config:set –base-url=”http://domain.com/” php bin/magento setup:store-config:set –base-url-secure=”http://do..
SELECT * FROM information_schema.processlist WHERE command != ‘Sleep’ ORDER BY id\G Source – https://makandracards.com/makandra/7681-show-mysql-process-list-without-sleeping-c..