• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Renaming of a domain requires server restart to keep fail2ban working

Thomas Poisl

Basic Pleskian
If you rename a domain, fail2ban will stop working, since it still tries to open the old path the the web access log.

One workaround is to restart the server after renaming the domain, then fail2ban paths are updated.

I'm using plesk 12.0.18.
 
Hi Thomas Poisl,

don't you think that it is much more effective, if you just restart Fail2Ban ?

If you change a domains name, fail2ban will not restart automatically like apache and/or nginx for example, so fail2ban doesn't know, that the paths changed. Please see the configuration files i.e: "plesk.conf" at "/etc/fail2ban/jail.d" - the section "[plesk-apache]" for example looks for error.logs in "logpath = /var/www/vhosts/system/*/logs/error_log" and the new path(s) are only used, if you restart Fail2Ban. If you changed a domain name, you will see in the fail2ban.log, that Fail2Ban still looks for the error.log in the old path, which causes an error, when the path isn't existent any more.

Absolut sufficient would be, after you changed vhosts - paths:

service fail2ban restart
or
/etc/init.d/fail2ban restart
 
Ok, I'll check that...

But the really bad thing about that domain renaming is, that fail2ban stops working... and if you don't check the logs you won't even notice that it is not working anymore.

Maybe a good solution would be to send a fail2ban restart automatically, when a domain is renamed, don't you think?
 
Hi Thomas Poisl,

renaming domains ( or changing vhosts - paths ) is not really a "common" procedure and I would like to mention, that Fail2Ban is an addon ( extension ). You should always be aware, that if you use additional services, then consider their restarts after such a procedure, because Plesk won't check any running service on your server, so it could restart them in case you made an essential change on a vhost - path. Be aware as well, that Fail2Ban is not installed on every server which uses Plesk, because it is not a necessary extension on a server... it's a user choice.
 
Shouldn't be that much effort to check for the service and restart it in the case of a domain rename, or?

For me it seemed a valid scenario to allow new customers the possibilty to move their site to a temporary domain name, e.g. "<customer>.<hosting-provider-tld>" before it is transfered and renamed.

But if there is a better practice for such migration scenarios, I'd really love to hear about it.
 
Hi Thomas Poisl,

I don't have to understand, WHY you move new customer to a subdomain like "<customer>.<hosting-provider-tld>", before you create the desired domain for the new customer, but did you know that a preview of the new domain exist, even that the DNS entries are not synched with the new IP yet? ( pls. view the setting "Tools & Settings > Website Preview Settings" ) and the depending configuration i.e. at the domain specific http.conf : "ServerAlias "customer-site.tld.192-0-2-12.your-domain.tld" ).

To answer the question "Shouldn't be that much effort to check for the service and restart it in the case of a domain rename, or?", I would again re-ask, why you don't just restart Fail2Ban with the commands like suggested above, instead of asking for a complex re-coding of several Plesk files? If you know, that Fail2Ban ( because it is an extension, which doesn't depend on the webservers on the server ) isn't restarted in case of domain renaming, it is by far easier, just to restart the service after your changes, than to re-code several Plesk files.
 
Hi Igor, I'm using latest Plesk 12.0.18 Update #35 on CentOS 6.6 (Final). Please don't hesitate to ask, if you need more info.
 
Back
Top