Tag: subdomain

How do I change the DocumentRoot of only one of my subdomains?

by admin on Sep.07, 2009, under DirectAdmin

1) If you wish to change just 1 subdomain path, you’d use this guide as a starting point:
http://help.directadmin.com/item.php?id=3
and insert the following code

|*if SUB="subname"|
|?DOCROOT=/the/new/path/you/want|
|*endif|

This will do a check on the subdomain name.
Change subname to the name of the subdomain you want to set the path for.
Also change the path to the path you’d like.
Failing to use the if statement on the subdomain will cause the main domain and all subdomains to use this new path, which isn’t always as desired.
2) Going into more detail, the DocumentRoot for a subdomain will always have the "sub" name appended to the end. If this is not the desired effect, then the templates would have to be modified to get rid of the bit on the end, while still allowing subdomain paths for normal subdomains to be valid. To do that, first copy the templates to the custom folder

cd /usr/local/directadmin/data/templates/custom
cp ../virtual_host2*_sub.conf

Then edit both of the virtual_host2_sub.conf and virtual_host2_secure_sub.conf files. Find the following line:

|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html|

and change it to be:

|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html/`SUB`|

Same thing for this line:

|?CGI=ScriptAlias /cgi-bin/ `DOCROOT`/`SUB`/cgi-bin/|

change it to be:

|?CGI=ScriptAlias /cgi-bin/ `DOCROOT`/cgi-bin/|

and one last time for a 3rd line, change:

<Directory |DOCROOT|/|SUB|>

to be:

<Directory |DOCROOT|>

Save the 2 virtual_host2*_sub.conf with these 3 changes, then proceed with step 1 normally, and the path will be what you’re looking for. All existing subdomains will also remain unaffected, since we just moved the SUB part from the bottom, and moved it to the top.


3)Similarly, if you only which to change the path of the domain and not any subdomains, you can use

|*if !SUB|
|?DOCROOT=/the/new/path/you/want|
|*endif|

so that only if there is no subdomain name, then the path will be altered.

Leave a Comment :, , , , more...

Wildcard *.domain.com

by admin on Sep.07, 2009, under DirectAdmin

If you’d like to setup your domain to accept anything.domain.com, you can do so with the following guide (Admin access required)
1) Setup the dns with a wildcard A record. Go to Dns Control, and add an "A" record:
* -> 1.2.3.4
where 1.2.3.4 is the IP of your domain.
This will allow anything.domain.com to resolve to your server. Apache does not yet know how to direct that name though.
2) To setup apache, go to:
Admin Level -> Custom Httpd configurations -> domain.com
In the top text area, add this *one* line:

ServerAlias *.|DOMAIN|

then click "Save".
That should be it. Wait a few minutes for everything (apache, named) to be restarted then test it out.
The wildcard subdomains will point to your main public_html directory for the domain.
If you want to change this, it’s probably best not to do step 2, and to setup your own custom virtualhost manually into the /etc/httpd/conf/httpd.conf (DA wont delete/overwrite it there) with the same ServerAlias directive as in step 2.
Other similar uses might be subdomain aliasing, where test.domain.com is the same as test.domain2.com.
You can accomplish this by following step 1) above, then insert the following instead of step 2) above:

|*if SUB|
    ServerAlias |SUB|.domain2.com
|*endif|

which will make any existing subdomain from domain2.com point to domain.com.

Leave a Comment :, , , , more...

DirectAdmin – Site Statistics

by admin on Jul.27, 2009, under Tutorial

Checking Disk Space and Bandwidth 

To check disk space and bandwidth usage, click on the "Statistics" icon from the main control panel menu.  At the top of the screen you will see these tables:

The numbers in the tables represent megabytes, and approximately 1000 megabytes = 1 gigabyte. 

You are provided with two different disk space / bandwidth measurements.  The first table lists usage by domain and the second table lists total usage.  Total usage is generally higher than domain usage because total usage statistics include factors that are separate from your domain, such as MySQL databases and control panel use.  It is possible to host several domains on one account, so separating domain and total usage is necessary.

Note:  DirectAdmin uses total usage (not domain usage) to determine when quotas have been exceeded.

Accessing System Logs

At the top of the Statistics menu are three text links: "Backed up Apache Logs," "Apache Usage Log," and "Apache Error Log."

Backed up Apache Logs

Clicking the "Backed up Apache Logs" link will bring you to a File Manager screen containing a list of .tar.gz files named by domain/subdomain and month.  For example:

Here we see four backups for the month of April: the subdomains (admin, newsub, and reseller), and the backup for the main domain (Apr-2003.tar.gz).  Backed up Apache logs contain both usage and error data.

Click on the file name of the backup to download it.

Note:

Log files are owned by the server administrator and cannot be deleted.  Log files do not count towards your disk space quota.

Apache Usage and Error Logs

Apache usage and error logs can be viewed directly by clicking on the "Apache Usage Log" or "Apache Error Log" link. 

The raw logs appear in a large text box that looks like this:

The above image is an example of an error log.  Viewing raw logs are a great way to troubleshoot specific problems, such as installing and executing scripts.  Both logs (usage and error) are backed up monthly and archived in /home/domain.com/logs.  Please see the previous section ("Backed up Apache Logs") for more information.

Viewing Account Information

The main Statistics menu provides a great deal of information.  As mentioned above, the first two rows of the table (Bandwidth / Disk Space) provide total usage.  That is, DirectAdmin uses these numbers for quota purposes (and not the numbers in the Domain Statistics table — see first section entitled "Checking Disk Space and Bandwidth").

When your account reaches the maximum bandwidth usage, your site will stop functioning until the first day of the next month.  When your account reaches the maximum disk space usage, you will not be able to upload to your site until some files are deleted.

The information in this table is self-explanatory and will not be discussed in depth.  If you haven’t done so already, please set your current e-mail address in the "Email" field and click "Save."

Webalizer Statistics

In the main Statistics menu, click on the appropriate domain name to launch Webalizer.  Please note that your site must be up for 24 hours and have some log activity before Webalizer statistics will become active.

At the first Webalizer screen, you will see a chart (like the one above) and a list of months in a table below.  Click on the month you want to view.  Webalizer statistics are very detailed and will provide a great deal of information about site traffic, most requested URLs, exit points, location of visitors, and much more.

Leave a Comment :, , , , , more...

DirectAdmin – Subdomains

by admin on Jul.25, 2009, under Tutorial

This document provides information about subdomains.  Topics include creating subdomains, removing subdomains, subdomain statistics, usage logs, error logs, and creating FTP users for individual subdomains.

Creating Subdomains 

To create a subdomain, click on the "Subdomains" icon in the main control panel menu.

In the above example we are creating newsub.sitehelper.com.  To create the subdomain, click the "Create" button.

You may also create sub.sub.sub.sub.domain.com.  In the above example we have created i.love.site-helper.com.

Note:  It may take up to five minutes for a new subdomain to become active.

Uploading to a Subdomain

Each subdomain appears in public_html/subdomain-name.  This means that your subdomain can also be accessed at http://www.yoursite.com/subdomain-name.  You can upload to a subdomain folder in the same way you upload to any other folder: use FTP, MS FrontPage, File Manager, etc.

Removing Subdomains

To remove a subdomain, place a check next to the subdomain(s) you want deleted, then click the "Delete Selected" button.  Next to the "Delete Selected" button is a checkbox called "Remove Directory Contents."  Check this box if you want the subdomain directory and its files to be deleted.  If you don’t check the box, the subdomain will stop working but the files and directory will remain intact.

Subdomain Statistics

Beside each subdomain name is a "Stats" link (see above picture).  This link will load Webalizer statistics.  Please note that for the link to work (1) your subdomain must have some traffic (at least one hit) and (2) your subdomain must be more than one day old.  Until these requirements are met, the "Stats" link will return a file not found error.

Usage Log / Error Log

The "Usage Log" and "Error Log" links (see above picture) will take you to text version of each log file.  The usage log provides the IP address of the requester, time and date of the request, and the description of the request.  The "Stats" link (see Subdomain Statistics section) is a graphical version of the usage log.  The error log provides information about unsuccessful requests and is useful for troubleshooting when the cause of the error is unknown.

The usage and error logs are accessible immediately after subdomain creation.  You will see a blank box if there has been no subdomain activity.

Creating FTP Users for Individual Subdomains

To restrict an FTP account to a single subdomain, follow these steps:

1.  Create the subdomain if you haven’t done so already.

2.  From the main control panel menu, click the "FTP Menu" icon and then the "Create FTP account link."

3.  In the "FTP Username" field, enter the subdomain name (without .yourdomain.com).

4.  Enter a password in the password fields.

5.  Select the "User" radio button.

6.  Click the "Create" button.

Leave a Comment :, , more...

DirectAdmin – Getting Started

by admin on Jul.22, 2009, under Tutorial

This document provides information about domain names, editing HTML, and accessing the control panel.  It serves as a basic introduction to web hosting and is intended for beginners.  Experienced users may skip this document, except for the section entitled Accessing the Control Panel for the First Time.

Registering a Domain

Domains are a unique way to identify yourself on the Internet.  There are two parts to a domain: the name and the extension.  The name is the description of yourself or your site (for example, the name "dogfood" in dogfood.com).  The extension represents the domain category.  For example, the .com extension means "commercial," .net means "network," and so on.  There are many extensions available today: .biz (business), .info (resource sites), .us (American sites), .ca (Canadian sites), to name a few.  The "www" is automatically inserted by the web server that hosts your site and is not part of the domain name.

You cannot use a domain name until you register it.  In addition, you cannot register a domain name that is owned by someone else.  The registration process is fairly simple:

1. Decide on a domain name and extension.

2. Select a registrar and register your domain name.

3. Find a host for your domain name.

Deciding on a domain name and extension is difficult because most names are already taken, especially with the .com extension.  We highly recommend nameboy.com, a free service that finds not-yet-taken domain names based on one or two words describing your site.

There are many registrars on the Internet.  A simple search engine query for "domain name registration" will return hundreds, if not thousands of results.  Be sure to choose a registrar that supports the extension you want (for example, not all registrars will sell the .cc extension).  Comparison shopping is wise because registration fees can vary greatly between registrars.  Domain names are leased, and the registration fee usually represents the cost for one year of ownership.

Once you have purchased a domain name you will need somewhere to host it.  The domain name is just an address; that is, it points to files on a web server.  Hosting companies provide web servers and this is where your web site is stored.  A search engine query for "web hosting" will return thousands of results.  To help you select a web host, we suggest reading the article entitled Choosing the Right Web Host for Your Site.

Your web hosting company is the best resource if you are still confused about domain names.  Many hosts will assist you in the domain registration process and ensure that everything is configured properly.

Transferring a Domain

Transferring a domain can mean two things: switching the domain name to another registrar, or altering the domain record to make the domain point to a new host.  We are concerned with the second definition.  A domain has to be told which web host to direct visitors to, and this is done by changing the domain’s name server records.

For example, say you purchased a hosting account at indovps.com.  They tell you to put their name servers in your domain record.  These name servers might look like:

nsXX.anyoneserver.com (192.168.0.1)

nsXX.anyoneserver.com (192.168.0.2)

You will then visit your domain registrar’s home page, sign in, and edit your domain record.  Each registrar is different, but there will be fields in your domain record called "name severs," "primary/secondary name servers," etc.  The registrar may or may not ask for the IP address of the name servers (192.168.0.1 and 192.168.0.2 in this example).  It takes 12-48 hours for the change to take effect.

Editing HTML

HTML, or hypertext markup language, is the language that tells web browsers how to display a page.  For example, to <b>bold</b> text in HTML, you would start with the <b> tag and end with </b>.  Anything between these tags will appear bold (visitors will not see the <b></b>).  When someone visits www.yourdomain.com, they are actually accessing the index.html file in your main web site directory.

Editing HTML requires software specifically designed for the task.  Examples include Microsoft FrontPage, HotDog Professional, and Macromedia Dreamweaver.  There is also shareware and freeware HTML editors available from popular download sites such as download.com. 

Even the best HTML editing software can be confusing for beginners.  If you fall into this category, we suggest using an online site builder / HTML generator.  No knowledge of HTML is required — online site builders ask you questions and then form a web site based on that information.  Some site builders allow you to control the look of the site, insert graphics, scripts, etc.  Most site builders are free but the more advanced ones charge an access fee.  Some free site builders include:

http://www.uweb.ucsb.edu/generator/basic.php

http://www.3zweb.com/free/index2.htm

http://www.searchbliss.com/free_web_tools_html.htm

http://www.applelinks.com/tools/webpage.shtml

Accessing the Control Panel for the First Time

There are several ways to access the control panel:

http://www.yourdomain.com:2222  You can access the control panel through any domain or subdomain by putting :2222 after the address.

http://www.yourdomain.com/config  You can access the control panel by adding /config to your domain or subdomain address.

http://192.168.0.1:2222 or http://192.168.0.1/config  You can access the control panel through any IP address allocated to the server.  This is useful when your domain transfer has not yet propagated.

A window (similar to the one pictured on the right) will appear.  Enter your username and password.  Once signed into the control panel you should do two things. 

First, click on the "Message System" link at the top-right of the page. Important messages about your account may come through the message system, so we recommend that you enter your e-mail address at the bottom of the screen and check the checkbox.  If you do this, the control panel will e-mail you when a message comes in.

Second, return to the main menu and click on the "Statistics / Logs" icon.  About halfway down the screen there will be a box to enter your e-mail address.  Confirm that the e-mail address in the box is accurate.  If not, change it and click on the "Save" button.  It is important to have a valid e-mail address in this box because the control panel will e-mail you whenever your account is close to going over its bandwidth limit.

The Ticket Support System

The control panel features a built in message system.  Clicking the "Message System" link at the top of the screen will bring you to the message system menu.  "N messages waiting" will always be displayed next to the link.  Messages may contain important information, so read them as soon as possible.

The message system has two components: a ticket support system and a private message system.  If you needed assistance, you would click the "Create a Ticket" link.  Your hosting company’s support staff would respond to this ticket and you would click on the ticket name to read it.  Private messages are shown in the same table.  Private messages are different because they are not responses to a support ticket.  Private messages can include scheduled downtime alerts, system-wide announcements, and warnings that your account is reaching its limits.  To read a private message, click on its title.

Creating a Ticket

1. Click the "Create a Ticket" link.

2. Select message priority:

Low:  Problem is not causing immediate difficulty.

Medium:  Problem is causing immediate difficulty.

High:  Problem needs to be addressed right away.

3.  Enter a subject that describes the problem in a 

few words.

4.  Explain the problem in full detail.

5.  Click "Save."

The support staff may respond to your ticket and close it.  A ticket will be closed when the problem is resolved; that is, there is no need for the ticket any more.  If you have new messages waiting and don’t see them in in the ticket listing, click on the "View Closed Tickets" link.  If you feel that your problem has not been resolved then you may reply to the closed ticket.

Important note:  Your hosting company may disable your ability to send tickets.  This typically occurs when they have a different support system in place.  If you can’t create a ticket, visit your host’s web site for support information.

Changing Your Password

To change your password, click on the button located at the top-right corner of the screen.  You will be asked to enter your current password and then your new password twice.  Click the "Submit" button to confirm and save.  The control panel will reject your password if it is too short or contains inappropriate characters.

Important note:  This feature only changes the password for your username.  Other e-mail accounts, databases, FTP accounts, etc. will not be affected by the password change.

Signing Out

To sign out of the control panel, click on the button.  You will be taken to a screen confirming that you have signed out successfully.  Click the the link to sign back in.

Important note:  Many browsers keep your control panel session in memory even after you sign out.  If you are not the only one that uses your computer, then be sure to close all running copies of your browser before leaving your workstation.  This will clear the browser’s memory and make it impossible to sign into the control panel without the correct password.

Leave a Comment :, , , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Kontak

Budhi Indah A 31
Cimindi Cimahi 40514
West Java
Indonesia

Phone/SMS :
Info/Bantuan : 62-8158-6270622
Billing/konfirmasi : 62-8888-763551

Self Advertise


My site is worth $7548.2.
How much is yours worth?