Basics like how to use ssh, how to login to DA etc.. How to customize the output of webalizer
Basics like how to use ssh, how to login to DA etc.. How to customize the output of webalizer-DirectAdmin uses the default webalizer settings by not specifying a webalizer.conf file at all.
ssh, If there you want to adjust the settings for webalizer, you can create your own basic webalizer.conf file for DA to use. This file must be domain independent because this one file will be used for all domains without any modifications to it.
Create:
/usr/local/directadmin/data/templates/custom/webalizer.conf
Then Add the custom settings you wish to use to that file.
Example webalizer.conf file:
Do reverse IP lookups:
DNSCache /var/cache/|DOMAIN|.dns_cache.db
DNSChildren 10
*Note, using tokens in this file requires DA 1.24.0 or later.
How to allow webalizer stats to be viewable through the web
If there a User does not want to have to login to DirectAdmin each time he accesses his webstats, a symbolic link can be made to access webalizer through www.domain.com/webstats
cd /home/username/domains/domain.com/public_html
ln -s ../stats webstats
ssh
Where the username is the name of the user, domain.com is the name of the domain and webstats is the name of the path you want to use through Apache.
How to forward a website to another url
There are several ways to accomplish this task, but the simplest to understand that is to use php.
For doing this, you need to create the page that will do the forwarding. This can be any page, as long as it ends in “.php”.
If there you are trying to redirect a domain, you would create “index.php” inside the public_html directory.
Once you decide which page you will use, then create the file and enter the following text:
<?php
header(“Location: http://whereyouwant.com/to/go.html“);
?>
Where http://whereyouwant.com/to/go.html is the location that you want the page to forward to. You can use a local values, ie: /page.html, or full urls as in the above example (http://..etc.)
Another way to accomplish this is to use an .htaccess file in the public_html directory. the Sample contents are:
Redirect 301 / http://whereyouwant.com/to/go.html
which will generate a similar result as the index.php Location redirect.