Domain Alias, Logrotation

Locked
majorboobage
Posts: 37
Joined: Thu 26. Jul 2018, 08:51

Domain Alias, Logrotation

Post 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
User avatar
Alexander
Keyweb AG
Posts: 3810
Joined: Wed 20. Jan 2016, 02:23

Re: Domain Alias, Logrotation

Post 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."
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
nikko
Posts: 914
Joined: Fri 15. Apr 2016, 16:11

Re: Domain Alias, Logrotation

Post by nikko »

OK, Alex was faster :lol:
The software said: Requires Win Vista®, 7®, 8® or better. And so I installed Linux.
majorboobage
Posts: 37
Joined: Thu 26. Jul 2018, 08:51

Re: Domain Alias, Logrotation

Post 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
User avatar
Alexander
Keyweb AG
Posts: 3810
Joined: Wed 20. Jan 2016, 02:23

Re: Domain Alias, Logrotation

Post 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.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
majorboobage
Posts: 37
Joined: Thu 26. Jul 2018, 08:51

Re: Domain Alias, Logrotation

Post by majorboobage »

Sooo, where i can find IP Anonymization in new UI? :D

Update: found it! Settings > Configuration > Data privacy


closed :)
Locked