Redirect and keep everything after the URL RewriteCond %{HTTP_HOST} ^DomainA.com RewriteRule ^(.*) https://DomainB.com/$1 [P] Redirect a domain to a specific url RewriteCond %{HTTP_HOST} ^DomainA.com RewriteRule ^(.*)...
Continue reading...Thermal sensors
for i in /sys/class/thermal/thermal_zone[0-9]/temp /sys/class/hwmon/hwmon[0-9]/temp[0-9]_input /sys/devices/platform/coretemp.[0-9]/hwmon/hwmon[0-9]/temp[0-9]_input do [[ -e $i ]] && echo „$i : $(
Continue reading...Export IP:PORT from random text file to the list
You can use a combination of Linux commands to filter out IP:port pairs from a text file and create a list. Assuming that the IP:port pairs...
Continue reading...sysctl.conf
/etc/sysctl.conf net.ipv4.ip_forward=1 net.ipv4.conf.default.rp_filter=0 net.ipv4.conf.all.rp_filter=0 net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 net.ipv4.conf.all.proxy_arp=1 sysctl -p
Continue reading...Custom DocumentRoot for a Domain in DirectAdmin
If you need to permanently change Apache DocumentRoot for just a single domain, you should do this as Admin. Go to http://[domain]:2222/CMD_CUSTOM_HTTPD?domain=[domain] In the first window,...
Continue reading...Directadmin increasing mysql limits script
#!/bin/sh #Limits (setting these options to 0 removes the limit) MAX_QUERIES_PER_HOUR=30000 MAX_UPDATES_PER_HOUR=20000 MAX_CONNECTIONS_PER_HOUR=5000 MAX_USER_CONNECTIONS=100 #We get DirectAdmin MySQL root user and password here DA_MYSQL=/usr/local/directadmin/conf/mysql.conf MYSQLUSER=`grep „^user=”...
Continue reading...IP Failover enable
nano /etc/rc.local #!/bin/bash ifconfig ens3:0 188.165.x.x/32 exit 0 save chmod +x /etc/rc.local Don’t forget to edit your correct network interface (ens3)
Continue reading...IP Tunnel (GRE) in LXC proxmox Container
After container is created, you need to edit the configuration file to add the /dev/net/tun device. # pct config 123 arch: amd64 hostname: CT123 memory: 512...
Continue reading...
Naujausi komentarai