Page not found – ShopingServer Wiki http://wiki.shopingserver.com Tutorials and Articles About Technology and Gadgets Tue, 14 Apr 2020 12:26:33 +0000 en-US hourly 1 https://wordpress.org/?v=5.5.14 http://wiki.shopingserver.com/wp-content/uploads/2018/07/cropped-favicon-150x150.png Page not found – ShopingServer Wiki http://wiki.shopingserver.com 32 32 Basics like how to use ssh, how to login to DA etc..How do I add an additional IP to a domain using the multi-IP system? http://wiki.shopingserver.com/how-do-i-add-an-additional-ip-to-a-domain-using-the-multi-ip-system/ http://wiki.shopingserver.com/how-do-i-add-an-additional-ip-to-a-domain-using-the-multi-ip-system/#respond Tue, 14 Apr 2020 12:26:33 +0000 http://wiki.shopingserver.com/?p=27322 Basics like how to use ssh, how to login to DA etc..How do I add an additional IP to a domain using the multi-IP system? With DirectAdmin 1.37.0 and newer,

If the multi-IP system allow for multiple IPs to be assigned to a User.  This lets the User have unique IPs for each domain they may have on their account (or for multiple IPs per domain, useful for IPv6)

Please Note that this guide is only to add additional IPs to a User account, then giving the User multiple IPs (owned or shared).
If then you are looking to just change the IP of a User to an owned IP,

This will be also useful for having multiple domains with SSL under one User account.  This is because a domain requires a unique owned IP in order to use an ssl certificate.

With the multi-IP system, this can be accomplishing all under the same User account.

*** Please Note *** : when upgrading from 1.36.2 (or older) to 1.37.0 (or newer), in order to use the multi-IP system, you must enable the unified ftp password file option, or else the multi-IP system will be disabled.


To assign a domain it is own IP using the multi-IP system (where the User account already has another IP for other domains), do the following:

1) Ensure the Creator of the User has an IP available.  Go to:
Reseller Level -> IP Management

If  there you are assigning an ssl certificate, ensure you see an IP with status “free”.

If there you are assigning an additional IP to a User and plan on sharing this new IP with other Users as well, it must be set as “shared” (select the IP, click “set as shared”).  Only a free IP can become sharing it. If it is own, you must remove it from the User who owns it.

Once your IP is setup as desired, skip to step 3.  If it is not in the list, go to step 2.

2) If there you do not see the IP in the list, you will need to assign one to the Reseller.
To do this, go to:
Admin Level -> IP Management

select an IP that is not assigning to any Reseller, then click the “Assign To” button, with the relevant Reseller selected.

3) At this step, we assume the the Reseller has the additional IP available.  To assign this additional IP to the User to use, go to:

Reseller Level -> List Users -> username -> Modify User username

In the row that says “Add Additional IP”, select the IP and click “save”.  A free IP will not have the word “Shared” beside it.

After this point, the IP will now be assigning to the User, ready for them to use.

4) From here, the User must then assign it to their domain.  To do this, login as the User and go to:
User Level -> Domain Setup -> domain.com

at the bottom of the page, you will see “Add another IP to domain.com”.  Select your new IP, and click “Add IP”.
If there you need, remove the other IP from the domain’s IP list.

Please Note that it is normal that you will see the Apache page or the shared IP page in place of the domain for up to 4 hours.

This will be due to DNS propgation

One trick to remove the issue with propagation is to remove the old IP from the domain, but then temporarily re-add it to the domain *without* the option “Add dns records for this IP” enabled.

What this will do is add the old IP into the Apache configs (to handle the old cached IP), but will not have it in the dns, so once the old IP expires from the dns cache (at your ISP’s name servers), only the new IP will remain.

After about a day, you can remove the old IP again so it is not in the configs.

]]>
http://wiki.shopingserver.com/how-do-i-add-an-additional-ip-to-a-domain-using-the-multi-ip-system/feed/ 0
Basics like how to use ssh, how to login to DA etc..I would like to have Country stats in awstats http://wiki.shopingserver.com/login-to-da-etc-i-would-like-to-have-country-stats-in-awstats/ http://wiki.shopingserver.com/login-to-da-etc-i-would-like-to-have-country-stats-in-awstats/#respond Tue, 14 Apr 2020 12:10:52 +0000 http://wiki.shopingserver.com/?p=27320 Basics like how to use ssh, how to login to DA etc..I would like to have Country stats in awstats

Although there are more complex/recommended ways of enabling country stats in awstats (the geoip plugin), a very quick and easy way to enable basic country stats in awstats is to edit:

/home/username/domains/domain.com/awstats/.data/awstats.domain.com.conf

and set:

DNSLookup=1

Please Note that this will likely slow down the computation of stats significantly, since many reverse IP lookups would need to be done.


A better method for doing the Country stats is to use the GeoIP plugin.
A very rough guide would be as following (beyond our support):

1)

wget http://maxmind.com/download/geoip/api/c/GeoIP.tar.gz
tar xvzf GeoIP.tar.gz
cd GeoIP*
./configure
make
make install

2)

cpan -i Geo::IP

3) And the edit the domain’s awstats configs file:

/home/username/domains/domain.com/awstats/.data/awstats.domain.com.conf

and set:

LoadPlugin=”geoip GEOIP_STANDARD /usr/local/share/GeoIP/GeoIP.dat”

You can leave the other setting as DNSLookups=0


If you would like to have default values for your new domains, the template can be found here:

/usr/local/awstats/wwwroot/cgi-bin/awstats.model.conf

on the first run of AwStats, this will will be copying over.  This template is not used for existing domains, only new domains.

I wish to change the IP of my domain, but have no downtime, whatsoever.

This example shows how you can change the IP of your domain without having any downtime.
This assumes both IPs are going to be on the same box.

We will also use the Multi-IP system and just assign the 2nd IP to 1 domain, and temporarily have 2 IPs on the same User account (you can change it later if you want).

This allows multiple domains to be on the User account, and they will be unaffected.

We will assume we have domain.com using 1.2.3.4, and we will change the domain (not the User) to use 1.2.3.5, but still allow 1.2.3.4 to work in the background for a short period (hence no-downtime).

1) Add 1.2.3.5 as a 2nd IP to the domain using the Multi-IP System

2) Edit your dns to remove all 1.2.3.4 IPs:
User Level -> domain.com -> DNS Management -> remove all A records that point to 1.2.3.4.

Please Note, leave your TXT record (spf) if 1.2.3.4 is your server IP.  Outbound emails will always leave from your server IP, so it needs to stay put.

3) Wait 4 hours.   Then wait some more (maybe a day).  This is for dns propagation.  We need the old 1.2.3.4 IP to get flush out of the dns system on everyones dns servers (not just yours).

4) Once the dns has propagated and been flushed out, then you can fully remove 1.2.3.4 from the domain (and User if you want).
User Level -> Domain Setup -> domain.com -> remove 1.2.3.4.

OR, to remove it from the User (has to be doing quickly):
– Remove 1.2.3.5 from the domain
– Re-add 1.2.3.4 to the domain
– Go to Reseller Level -> List Users -> username:  remove the 1.2.3.5 additional IP.
– At the same page, change the main IP for the user from 1.2.3.4 to 1.2.3.5.

]]>
http://wiki.shopingserver.com/login-to-da-etc-i-would-like-to-have-country-stats-in-awstats/feed/ 0
Basics like how to use ssh, how to login to DA etc..How to assign a User an ‘owned’ IP address http://wiki.shopingserver.com/how-to-assign-a-user-an-owned-ip-address/ http://wiki.shopingserver.com/how-to-assign-a-user-an-owned-ip-address/#respond Tue, 14 Apr 2020 11:52:56 +0000 http://wiki.shopingserver.com/?p=27318 Basics like how to use ssh, how to login to DA etc..How to assign a User an ‘owned’ IP address-If you’re trying to setup a User with an SSL certificate, you’ll need to assign the User an owned IP address.  

IP address, Note that newer OS’s (CentOS 6 and higher) support SNI, so there is no need to use an owning IP, unless you want IP access to the site (https://1.2.3.4) to show the site.

To set an owned IP, use the following steps:

  1. Ensure the Creator of the User has a free IP available.  Go to:

    Reseller Level -> IP Management

    ensure you see an IP with status “free”.  If you do, skip to step 3.  Note: If you wish to assign a User to a shared IP, ensure the IP is set to “shared” before assigning it to a User. Only shared or server IPs can have multiple Users assigned to them.

  2. If you do not see a free IP in the list, you will need to assign one to the Reseller.
    To do this, go to:

    Admin Level -> IP Management

    select an IP that is not assigning to any Reseller, then click the “Assign To” button, with the relevant Reseller selecting.

  3. At this step, we assume the the Reseller has a free IP available.  To assign that IP to the User to use, go to:

    Reseller Level -> List Users -> username -> Modify User username

    select the free IP and click “save”.  The free IP will not have the word “Shared” beside it.

After this point, the IP will now be assigning to the User.

Note that it is normal that you will see the Apache page or the shared IP page in place of the domain for up to 4 hours.
This will be due to DNS propagation


If you only have 1 IP and wish to install the SSL certificate onto the server IP,


Newer OS’s (CentOS 6+, Debian 8+) support SNI.  With SNI, owned IPs are not required for per-domain SSL.

I want to have the DirectAdmin version of Awstats

At First, if you have an AwStats plugin, that is not for ours, this guide does not refer to the plugin. They are 2 different things.

AwStats for DA is mentioning here

To install it, you login to ssh as root and type:

cd /usr/local/directadmin/scripts
./awstats.sh

See the above versions entry for more info on this feature.

]]>
http://wiki.shopingserver.com/how-to-assign-a-user-an-owned-ip-address/feed/ 0
Basics like how to use ssh, how to login to DA etc..How can I convert a unix timestamp into something readable? http://wiki.shopingserver.com/how-can-i-convert-a-unix-timestamp-into-something-readable/ http://wiki.shopingserver.com/how-can-i-convert-a-unix-timestamp-into-something-readable/#respond Tue, 14 Apr 2020 11:40:59 +0000 http://wiki.shopingserver.com/?p=27315 Basics like how to use ssh, how to login to DA etc..How can I convert a unix timestamp into something readable? The UNIX timestamp is a number representing the number of seconds since 1970.

Most applications can use this value to keep track of what time it is.
If there you have a unix timestamp and need to see what time it represents, then you can create a basic php script to decode it for you.
Create a time.php in your public_html foler, and enter the following data:

<html>
<body onLoad=”document.form.time.focus();”>
<?

if (isset($_GET[‘time’]))
{
echo date(“r”, $_GET[‘time’]);
echo “<br><br>”;
}

?>

<form action=time.php method=GET name=form>
Timestamp: <input type=text name=time> <input type=submit>
</form>

</body>
</html>

Then view it through the web, enter the number and submit the form.

How can I edit all of the templates, messages, and default index.html pages?

If there you are looking to customize the look and feel to the data that is using for your users, this guide will explain where these files are, and how to go about editing them. (note that this does not apply to skins)

To edit the default index.html placeholder file that new domains will getting after being created, you will edit the index.html found in /home/reseller/domains/default/index.html, where the reseller is the name of the account that will create the User.

If a User creating a secondary domain in his account, this same path still applies (that of the User’s creator)

One level above that, when a new Reseller or Admin is being creating, this “default” directory is creating and filling with defaults.

After their account is created, they will use these files as mentioning above.

If you want to edit the default files that are copying into /home/reseller/domains/default, you can find these defaults in:
/usr/local/directadmin/data/templates/default
However, you must ensure to follow the “templates” editing guidelines, which will be discussed next.

Message and templates can be found in:

/usr/local/directadmin/data/templates

Files here are reading in, usually “tokenized” (variable swap with real values) and use for their respective purposes.  Templates can be edited to customize the look and feel of this data, however there are few rules that need to be following to ensure your data stays intact.

The templates directory comes in the DirectAdmin update.tar.gz package,

so after each update of DirectAdmin, all files in the templates folder are overwrite. This allows the templates to stay updated to their latest version.

If you wish to make changes to these files, in order to prevent updates from overwriting your changes,

you simply first copy the template file that you wish to edit to the custom folder:
/usr/local/directadmin/data/templates/custom

then edit the copied file that’s in the custom folder.  Files in the custom folder override the files in the templates folder.

For the first example of directory templates (like the default/index.html) if you want to customize the index.html for new Resellers,

then you must copy the whole directory (and it’s full contents) into the custom folder, eg:
/usr/local/directadmin/data/templates/custom/default/*

Please Note that the placeholder index.html for the domains own by a Reseller is taking from his creator, not his own default directory.

So if  the”admin” where to create Reseller “bob”,

then bob’s own personal domains will grab the placeholder index.html from /home/admin/domains/default/index.html, and not his own default or the templates default.

]]>
http://wiki.shopingserver.com/how-can-i-convert-a-unix-timestamp-into-something-readable/feed/ 0
Basics like how to use ssh, how to login to DA etc..How to setup /~username/domain.com http://wiki.shopingserver.com/ssh-how-to-login-to-da-etc-how-to-setup-username-domain-com/ http://wiki.shopingserver.com/ssh-how-to-login-to-da-etc-how-to-setup-username-domain-com/#respond Tue, 14 Apr 2020 11:24:36 +0000 http://wiki.shopingserver.com/?p=27313 Basics like how to use ssh, how to login to DA etc..How to setup /~username/domain.com — If you wish to be able to control all domain on an account before they resolve, you can do so by creating some symbolic links.

Let us say you have domain1.com and domain2.com which you want to be able to access.  You would run the following as the user through ssh:

cd /home/username
rm -f public_html
mkdir –mode=755 public_html
cd public_html
ln -s ../domains/domain1.com/public_html domain1.com
ln -s ../domains/domain2.com/public_html domain2.com

ssh

Alternatively, if you would just wish to switch which domain is being use for /~username, you can do it so by logging into the User Panel -> Domain Administration -> select the active domain to use and click “Set as Default”.

This will then setup the symbolic link for the selected domain for  /~username.

How to add Frame Forwarding to your website

To add frame forwarding to your website, create your html file (usually index.html) with the following code:

<html><head><title>Title of your webpage</title></head>
<frameset cols=”*”>
<frame name=”main” src=”http://www.site-helper.com” scrolling=”auto” noresize>
<noframes>
<body>

Your browser does not support frames

</body>
</noframes>
</frameset>
</html>

Replace all bold items with the values you wish to use.

Why do I need an owned IP for my own SSL certificate?

The reason you must have your own dedicate IP address when you want to use your own SSL certificate (when you do not want the server wide sharing certificate) is because of the way SSL and Apache (httpd) works.

For name base web-hosting (when many domains are on one IP) the web browser will pass the name of the domain being requested inside the httpd headers along with the request.

This way, Apache knows which domain you are trying to access even though there are many domains on that one IP address.

When you want to do the same thing through an SSL connection, the connection has to be making *before* the request can be send.

In this connection, the certificate is passing.  The only information that Apache knows before the request is making is which IP the connection is being make to.

It has to be able to know which certificate to send before the request is making, thus you can not use multiple certificates on the same IP (if you do, Apache will use the first certificate listing which DA will always set to the server shares certificate for shared IPs).

If there you want to use your own certificate, it then must be the first certificate listing.  This would not work for a sharing IP, because there would multiple domain wanting this status, and the first certificate would the be one showing.

 For this reason the sharing certificate is always using on a sharing IP.

For your certificate, DA will acknowledge the IP as being ‘own’ and will remove the server sharing certificate as the first cert to be load, thus your certificate will now be loading instead.


There is a new feature calling SNI developing with Apache and OpenSSL, however, this requires recent version of OpenSSL and that client browsers also supporting it.

]]>
http://wiki.shopingserver.com/ssh-how-to-login-to-da-etc-how-to-setup-username-domain-com/feed/ 0
Basics like how to use ssh, how to login to DA etc.. How to customize the output of webalizer http://wiki.shopingserver.com/ssh-how-to-login-to-da-etc-how-to-customize-the-output-of-webalizer/ http://wiki.shopingserver.com/ssh-how-to-login-to-da-etc-how-to-customize-the-output-of-webalizer/#respond Tue, 14 Apr 2020 11:02:10 +0000 http://wiki.shopingserver.com/?p=27311 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.

]]>
http://wiki.shopingserver.com/ssh-how-to-login-to-da-etc-how-to-customize-the-output-of-webalizer/feed/ 0
Basics like how to use ssh, how to login to DA etc..Setting up DA with an SSL certificate http://wiki.shopingserver.com/ssh-how-to-login-to-da-etc-setting-up-da-with-an-ssl-certificate/ http://wiki.shopingserver.com/ssh-how-to-login-to-da-etc-setting-up-da-with-an-ssl-certificate/#respond Tue, 14 Apr 2020 10:45:10 +0000 http://wiki.shopingserver.com/?p=27308 Basics like how to use ssh, how to login to DA etc..Setting up DA with an SSL certificate-You can switch DirectAdmin to use SSL instead of plain text.

-> https instead of http on port 2222.
Please Note that this is for the DirectAdmin connection on port 2222, *not* for apache.
If there you are trying to setup a certificate for your domain through Apache,

Creating a Self-Signed Certificate

If there you do not have your own certificates, you will need to create your own:

/usr/bin/openssl req -x509 -sha256 -newkey rsa:4096 -keyout /usr/local/directadmin/conf/cakey.pem -out /usr/local/directadmin/conf/cacert.pem -days 9000 -nodes

chown diradmin:diradmin /usr/local/directadmin/conf/cakey.pem
chmod 400 /usr/local/directadmin/conf/cakey.pem

 


 

Installing a Purchased Certificate

If there you already have your own certificate and the key, then paste them into the following files:

certificate:  /usr/local/directadmin/conf/cacert.pem
key: /usr/local/directadmin/conf/cakey.pem

Edit the /usr/local/directadmin/conf/directadmin.conf and set ssl=1  (default is 0).

This tells DA to load the certificate and key and to use an SSL connection.
Ensure your directadmin.conf has the values set:

cacert=/usr/local/directadmin/conf/cacert.pem
cakey=/usr/local/directadmin/conf/cakey.pem

but can be changed as needed.
DirectAdmin needs to be restarted after any changes to the directadmin.conf.

If there you also have a CA Root Certificate, this can be specify by adding:

carootcert=/usr/local/directadmin/conf/carootcert.pem

into the /usr/local/directadmin/conf/directadmin.conf file (would not exist by default) and by pasting the contents of the caroot cert into that file.


 

Using the free “Let’s Encrypt” tool to secure 2222

As of DA 1.50.0, we have added a new feature that allows you to make use of LetsEncrypt, a tool for offering free basic SSL certificates.

  1. First, enable LetsEncrypt on your system
  2. Then setup the LetsEncrypt certificate for your hostname.

Please Note, as of 1.30.2, then you can set the value of the SSL redirect should a User connect to an https connection with plaintext http.

For 1.33.0, you can force DA to redirect to a specific host-name if you wish the host to match the cert installed:

However,

if there they connect to https on a different host, they will first get the ssl warning (since ssl is establish before the host is pass),

then they will be redirect to the correct host, where the error would not appear (assuming you have got a valid cert setup)

As of 1.33.3, you can enable a ssl cipher to force SSLv3, and disable SSLv2:
ssh

DA 1.48.4 will support HTTP Strict Transport Security (HSTS):
ssh

But we are recommending you enable both the force_hostname as well as the ssl_redirect_host with a non-apache-used host, like dabox.domain.com, and not www.domain.com, as HSTS does not respect only port 2222, it would bleed over to apache, changing http://www.domain.com (80) connections to use https://www.domain.com (443), even though the header was only set on port 2222.

]]>
http://wiki.shopingserver.com/ssh-how-to-login-to-da-etc-setting-up-da-with-an-ssl-certificate/feed/ 0
Basics like how to use ssh, how to login to DA etc..How to use SSH http://wiki.shopingserver.com/basics-like-how-to-use-ssh-how-to-login-to-da-etc-how-to-use-ssh/ http://wiki.shopingserver.com/basics-like-how-to-use-ssh-how-to-login-to-da-etc-how-to-use-ssh/#respond Tue, 14 Apr 2020 10:29:11 +0000 http://wiki.shopingserver.com/?p=27306 Basics like how to use ssh, how to login to DA etc..How to use SSH – SSH is a tool used to connect to your server. This is how 95% of your system is setup.

To use ssh, you will need an ssh client for your local computer.  We are recommending PuTTY

At Once you have installed your ssh client, load it up and you should be giving a space to enter some information.  You will want to select “SSH” on port 22.  You can then past in the name of your server “domain.com” or the ip “1.2.3.4” in the the space that says “Host Name (or IP Address)”.

Click Open.

If there you have entered all information correctly, you should be prompted with a large black screen asking for your login information.

If then you are doing system tasks, you will probably need root access.

Then  If you have root access, enter “root” and press enter.. sometimes it can take several seconds before you see any change.

Enter the root password (and press enter), and if there everything works well, you should see a command prompt, ex:

[root@server]#

Now You are on the server. This is your starting point.

From here now you can do anything, including destroy your server, so you must be very careful with the commands you enter.

And Some basic commands include:

List: ls

[root@server]# ls
file1.txt   file2.txt   file3.txt

Change Directories: cd

[root@server]# cd /home/admin

Remove a file: rm

[root@server]# rm file1.txt
rm: remove `file1.txt’ ? y

Once you have finished working, you can type

[root@server]# exit

and the ssh window should be closed.

Change email password without logging in

If there you would like your pop users to be able to change their own email passwords without having to login to the control panel, simply give them this link:

http://www.domain.com:2222/CMD_CHANGE_EMAIL_PASSWORD

Where www.domain.com is either your domain, host-name, or IP address.

More information is on this function and how you can use it via API .

There is also a DA plugin that also can gives email users the ability to change their passwords, and the vacation messages, and show them their email stats,

For automated vacation messages changes by email users, it can implementing via API here, or just use the plugin above:

A squirrel-mail plugin has been created which allows interaction with Direct-admin showing usage

]]>
http://wiki.shopingserver.com/basics-like-how-to-use-ssh-how-to-login-to-da-etc-how-to-use-ssh/feed/ 0