Do systemd unit files have to be reloaded when modified?

After you make changes to your unit file, you should run systemctl daemon-reload, as outlined here. daemon-reload Reload systemd manager configuration. This will rerun all generators (see systemd.generator(7)), reload all unit files, and recreate the entire dependency tree. While the daemon is being reloaded, all sockets systemd listens on behalf of user configuration will stay … Read more

What is archive mode in rsync?

It’s all of these: -r, –recursive recurse into directories -l, –links copy symlinks as symlinks -p, –perms preserve permissions -t, –times preserve modification times -g, –group preserve group -o, –owner preserve owner (super-user only) -D same as –devices –specials –devices preserve device files (super-user only) –specials preserve special files It excludes: -H, –hard-links preserve hard … Read more

Is it bad to redirect http to https?

The [R] flag on its own is a 302 redirection (Moved Temporarily). If you really want people using the HTTPS version of your site (hint: you do), then you should be using [R=301] for a permanent redirect: RewriteEngine on RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L] A 301 keeps all your google-fu and hard-earned pageranks … Read more

Finding out what user Apache is running as?

ps aux | egrep ‘(apache|httpd)’ typically will show what apache is running as. Usually you do not need to change the default user, “nobody” or “apache” are typically fine users. As long as its not “root” 😉 edit: more accurate command for catching apache binaries too

How to Unban an IP properly with Fail2Ban

With Fail2Ban before v0.8.8: fail2ban-client get YOURJAILNAMEHERE actionunban IPADDRESSHERE With Fail2Ban v0.8.8 and later: fail2ban-client set YOURJAILNAMEHERE unbanip IPADDRESSHERE The hard part is finding the right jail: Use iptables -L -n to find the rule name… …then use fail2ban-client status | grep “Jail list” | sed -E ‘s/^[^:]+:[ \t]+//’ | sed ‘s/,//g’ to get the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)