Page 1 of 1

Domain Alias, Logrotation

Posted: Thu 26. Jul 2018, 09:14
by majorboobage
Good afternoon. Thank you for a wonderful KeyHelp!
I have a few questions.

1. How can I use domain alias (not mail alias)?

2. How can I configure log rotation every 30 days and disable anonymization?

P.s. possible translation error, or I do not understand something? Image

Thanks

Re: Domain Alias, Logrotation

Posted: Thu 26. Jul 2018, 11:31
by Alexander
Hello and thanks for choosing KeyHelp!
1. How can I use domain alias (not mail alias)?
Let's say you have a domain "domain.com" pointing to a directory "/www/wordpress/" and a second domain "alias.com". Now, go to the edit page of "alias.com" and let it point to the same folder as "domain.com". (Technically it is not the 'Alias' directive which you would may set, when writing a vhost config for Apache, but the result is the same.)
Additional note: From SEO perspective this is maybe not the thing you want, because Google may punish such websites, called 'duplicate content' - you may want to setup a 301 redirect from "alias.com" to "domain.com" - just go to the edit page of "alias.com" and write into the 'Target' input field "http://domain.com" and choose the 301 redirect.
2. How can I configure log rotation every 30 days and disable anonymization?
Currently there is no way to configure logrotate settings via KeyHelp GUI, however you can edit KeyHelps logrotate config file manually. It is located here:

Code: Select all

/etc/logrotate.d/keyhelp-apache
You can disable IP Anonymization on Settings -> Server Settings -> Log settings.
There you find 2 config options to setup the feature in the way you need.
P.s. possible translation error, or I do not understand something?
You are right, this is a translation error in the current version, the correct sentence would be:

"If this option is disabled, the analyzing and parsing of web server log files by the analyzing tool AWStats is disabled."

Re: Domain Alias, Logrotation

Posted: Thu 26. Jul 2018, 11:46
by nikko
OK, Alex was faster :lol:

Re: Domain Alias, Logrotation

Posted: Thu 26. Jul 2018, 15:58
by majorboobage
Thanks for fast reply!

Alexander wrote: Thu 26. Jul 2018, 11:31 Additional note: From SEO perspective this is maybe not the thing you want, because Google may punish such websites, called 'duplicate content' - you may want to setup a 301 redirect from "alias.com" to "domain.com" - just go to the edit page of "alias.com" and write into the 'Target' input field "http://domain.com" and choose the 301 redirect.
Will that work with the files? I want to slowly move to a new domain and do not want many 404 errors when a user accesses an old link like olddomain.com/download/setup.zip
Alexander wrote: Thu 26. Jul 2018, 11:31
You can disable IP Anonymization on Settings -> Server Settings -> Log settings.
There you find 2 config options to setup the feature in the way you need.
I found out that those settings has no effect on this file /etc/logrotate.d/keyhelp-apache, if I disable anonymization via GUI, the anonymization script is still present, or I do not understand something again :)

Code: Select all

postrotate
/etc/init.d/apache2 reload > /dev/null
php /home/keyhelp/www/keyhelp/bin/anonymize_ips_after_rotation.php
endscript
And another question, after updating the panel, this file will be overwritten?

sorry if I ask stupid questions

Re: Domain Alias, Logrotation

Posted: Fri 27. Jul 2018, 13:04
by Alexander
Will that work with the files? I want to slowly move to a new domain and do not want many 404 errors when a user accesses an old link like olddomain.com/download/setup.zip
This should work!
I found out that those settings has no effect on this file /etc/logrotate.d/keyhelp-apache, if I disable anonymization via GUI, the anonymization script is still present, or I do not understand something again :)
This is normal. The script gets called but then is immediately terminated, when IP anonymization is disabled.
And another question, after updating the panel, this file will be overwritten?
A general rule, if filenames consists of the word 'keyhelp', or are in a subfolder called something with 'keyhelp' it could be, that the file content may get changed by a KeyHelp panel update. To prevent this one should make the files immutable (Command, chattr +i <filename>).


EDIT: Changed my answer to the first question.

Re: Domain Alias, Logrotation

Posted: Tue 1. Sep 2020, 11:51
by majorboobage
Sooo, where i can find IP Anonymization in new UI? :D

Update: found it! Settings > Configuration > Data privacy


closed :)