Getting Started With Linux® Shared Hosting
Getting Started With Linux® Shared Hosting
Distribution of this work or derivative of this work is prohibited unless prior written permission is obtained from the copyright holder.
All other trademarks and copyrights are the property of their respective owners.
Table of Contents
1 Setting Up Your New Hosting Account 1
Setting Up Your Account 1
Checking Your Hosting Account Status 3
Setting Up Your Domain Name Servers (DNS) 4
Getting Acquainted with the Hosting Control Center 6
Now that you’ve purchased your Linux shared hosting account, you’re probably anxious to
get started and set it up. But before you do, it’s a good idea to find out what’s going on
under the hood. This guide assists you in getting your Web site up and running quickly.
Along the way, we also pass on some general hosting information that you can use to
impress your friends.
Your shared hosting account resides on a server along with other accounts. The server’s
resources are shared across these accounts, hence the term shared hosting. This is in
contrast to dedicated hosting, which allows a single account to exclusively use one server.
A major benefit to having a shared hosting account is that we take care of your server
security, backup, and maintenance.
SECURITY INFORMATION
The most important security measure you can take is keeping your hosting account
password secure. Anyone with access to your password can potentially manipulate the
content on your site and compromise your account. If your password has been compro-
mised, you can change it through the Hosting Control Center.
GETTING HELP
After your account is set up, you can find shared hosting help on the Web with our Host-
ing Resource Center, located within the Help Center.
The Help Center, which is a knowledge base with the most cur-
rent shared hosting technical information, opens in a new win-
dow.
3. In the Get Help - Select Your Product section of the Help Center, click Hosting &
Servers and select Linux Hosting.
The Hosting Control Center also provides context-sensitive help through question mark
icons that appear beside select form fields. When clicked, these icons provide additional
information and/or explanation.
You can also contact Customer Support directly for answers to your questions.
Introduction v
OTHER RESOURCES
You can use these resources to learn more about programming your shared hosting
account:
Resource URL
W3Schools® http://www.w3schools.com/
DevGuru™ http://www.devguru.com/
Some prep work is required to ready your account for uploading site content. First, you
must set up your shared hosting account and specify its domain name servers (DNS).
Setting up your account installs the default hosting files and directory structure needed to
upload content. Accurate domain name server information must be assigned to your
account so visitors are directed to your site content.
To jump-start this whole process, you need to set up your hosting account.
4. The End User License Agreement displays. Read the agreement, select the
checkbox acknowledging that you have read and agree to it, and click Next.
5. Enter a new user name and password for your hosting account, and confirm your
password.
6. Click Next.
Fig. 1.3 - Select the domain you want to use with your hosting account.
8. Update the default account options if necessary, and then click Next.
Setting Up Your New Hosting Account 3
9. If you have a credit for an SSL certificate you want to add, select the appropriate
certificate, select the checkbox acknowledging you have read and agree to the SSL
Subscriber Agreement, and then click Next.
10. Confirm settings are correct. To update information, use the Previous button or click
the appropriate
11. Click Finish.
Hosting account setup generally occurs in under 30 minutes but can require up to 24
hours. We’ll send you an email with your account information when it is set up and ready
to use.
Status Explanation
Initialize Account You need to set up your hosting account in order to use it. To
set up your hosting account, click the name of the account you
want to set up.
Pending DNS Your hosting account needs to match up with your domain
name before you can upload files and manage your Web site.
Pending Account This account status displays whenever you have upgraded or
Change downgraded your hosting account.
Pending Setup This account status displays after you have set up your
account. It may take a few minutes for us to configure your
hosting account before you can use it.
Setting Up Your New Hosting Account 4
Status Explanation
Setup Your account is set up. You may still have to wait up to 48
hours before you can upload files to your account (FTP), set
up databases, or configure your Web site.
Once your hosting account is set up, you can log in to the Hosting Control Center to man-
age your account, set up databases, and install various Web site features.
This condition makes it possible for people across the Internet to access your Web site
using a familiar domain name, instead of having to remember a series of numbers.
It usually takes 4-8 hours for .com and .net domains, and 24-48 hours for other domain
extensions, before name servers on other networks are able to access the information
after the central registry receives it. This period is referred to as the propagation period.
You can check if your name servers change has propagated by navigating to
http://www.internic.net/whois.html and performing a Whois search on your domain
name.
The process for setting up your name servers depends on the company from which you
bought your domain. If your hosting account domain name was registered with us and
resides in the same shopper account, its name servers will be changed automatically at
the time hosting is set up. Otherwise, new name servers are required.
The default nameservers for your hosting account depend on the date you set up your
hosting. Use this list to determine your default nameservers:
ns51.domaincontrol.com
ns52.domaincontrol.com
OR
wsc1.jomax.net
wsc2.jomax.net
Check with your domain name registrar for specific instructions on how to change your
name servers.
These name servers will point your domain name to your hosting account.
Remember that it usually takes about 4-8 hours for .com and
.net domains and about 24-48 hours for all other domain
extensions before you can upload your Web site.
This is an example of what your Hosting Control Center looks like when you first log in:
The Hosting Control Center is a graphical interface whose purpose is to facilitate the man-
agement of your hosting account. All of the procedures outlined in this guide, with the
exception of uploading from a third-party FTP client, take place within the Hosting Control
Center. The Hosting Control Center is also a source of current account status information.
Error log, Web statistics, and language management interfaces are accessed from the
Hosting Control Center.
2. Creating and
Uploading a Web Page
The reason you purchased a shared hosting account to begin with is to see your original
content out on the Web. The easiest way to accomplish this is by creating and uploading
HTML/XHTML pages. In the sections that follow, we’ll walk you through both processes.
<html>
<head>
<title>My New Web Site</title>
</head>
<body>
<h1>This is My New Web Site</h1>
<p>Hey! Welcome to my Web site. I wrote this code all by
myself. Stay tuned.</p>
</body>
</html>
3. Save your file as index.html (all lowercase). Some editors try to save your file as
“index.txt,” but you should be able to override this by typing the file name when you
save your HTML page. If not, you can manually rename your file after you save it.
Creating and Uploading a Web Page 8
Here are a few places on the Web where you can learn more about HTML:
There are many free FTP clients available on the Internet that you can use to transfer
your files. If you only need to upload a few simple files, you can also use the Web-based
FTP client available in the Hosting Control Center.
4. Under the Content section of the Hosting Control Center, click the FTP Client icon.
5. If a security certificate window displays, click Yes or Trust to accept the certificate
and open the FTP program. In general, this is what the FTP program looks like when
you open it for the first time:
6. In the Local System section, go to the location on your computer where you saved
your index.htm file and select your file.
7. Click the >> arrows to upload the index.htm file to your hosting account.
After you upload your file, open a new Web Browser window and type the URL to your file
in the address bar. Your URL should look like this:
http://www.coolexample.com/
You should now see a simple Web page with the phrases, “This is My New Web Site” and
“Hey! Welcome to my Web site. I wrote this code all by myself. Stay tuned.” If not, you
may still need to wait for your hosting account to complete the setup process.
If you continue to have problems uploading your file, or you cannot see your index.html
page, please contact customer support.
These are some popular and inexpensive (some of them are free) FTP clients that you can
download and use:
FileZilla (Windows)
Smart FTP (Windows)
Fetch (Mac®)
gFTP (Linux)
Setting Explanation
FTP User Name This is the user name for your hosting account.
Start Directory Some FTP clients will ask for a “Home” or “Start” directory.
Our hosting service does not require this. Simply leave the
box blank or enter a single forward slash (i.e., /).
TROUBLESHOOTING
Sometimes you do all the preparations to get your Web site up and running, and some-
thing just doesn’t work. We have identified some of the most common pitfalls, or prob-
lems, that you may experience. This section presents important information and
recommended solutions for fixing these problems.
1. Double-check that the path to your image and the name of the image are the same,
including the use of uppercase and lowercase letters. If these names are not identical,
the server cannot find your image.
2. When the server cannot find an image, a red X displays. Right-click on the red X and
select properties to see the link to the image.
We recommend that you use relative URLs when linking to Web pages. Relative URLs
identify a Web page in relation to, or in the context of, the current page. Because they do
not reference the domain name, relative URLs do not require modifications when chang-
ing environments.
OR
wsc1.jomax.net
wsc2.jomax.net
Check with your domain name registrar for specific instructions on how to change
your name servers.
All our hosting plans include a number of free email accounts you can set up to incorpo-
rate your domain name. For example, if Jane Smith started an online business named
“coolexample.com,” she can create an email account with the address “jane@coolexam-
ple.com.” This address is personal, memorable, and slick.
Now that Jane Smith has her email address, let’s create yours.
Fig. 3.1 - Add Email Address link in the Email Control Center.
Setting Up Email For Your Hosting Account 17
5. In the Add Email area, select whether you’re using a domain registered or hosted
with us or one registered or hosted elsewhere, then in the Email Address field, enter
the first part of the email address that you want to create and specify the domain.
7. To send a carbon copy of all email messages sent to this account to another account,
in the Send Carbon Copies To field, type the email address(es) to which you would
like to send copies
8. Specify the space you would like to allow for this account. Note the total space
available and that you've used so far. You can increase or decrease this amount at any
time.
Setting Up Email For Your Hosting Account 18
10. Select the number of relays you want to send per day from the Relays per Day list.
If you will be using an email client, such as Outlook®, Thunderbird™, or Entourage®,
to send outgoing email through this account, you need to relay those messages
through our servers. All email accounts come with the capability of sending up to 250
email messages per day through SMTP Relay.
11. If you would like a message to be automatically sent to people when they send you
email, select the Auto-Responder checkbox and enter the response in the Auto-
Responder message field. If you would like to use a custom name or message
subject, enter them in the Custom Responder Properties fields. If you would like
to set specific start and end dates for your message, enter them in the Start Time and
End Time area.
User Name The name of the email account you created, for exam-
ple [email protected].
For more information about setting up mail accounts, please visit the support section of
our Web site.
smtpout.secureserver.net.
To access your email account using a Web browser, go to the following Web address:
http://email.coolexample.com
Sign in to your account using the email address and password you set up in your account
manager.
For example, to access Webmail for the domain that we set up in this guide, you would go
to http://email.coolexample.com/. To sign in, you would use the email address for the
account you want to access, [email protected].
4. Accessing Your Web
Site Statistics
The only thing more exciting than putting up a Web site is seeing that people actually visit
it. Knowing your audience can help you better tailor your site to their behavior. It just so
happens that all shared hosting accounts come with built-in Web statistics.
4. Under the Statistics section of the Hosting Control Center, click the Configure Web
Statistics icon.
6. The enabling process will begin automatically. It may take up to 30 minutes to take
effect in your account.
After enabling Web statistics for your site, it may take up to 24 hours for the collection of
data to begin.
http://www.coolexample.com/stats
The user ID and password for your statistics page is the same as the user ID and pass-
word for your hosting account, unless you have changed it in the Hosting Control Center.
Accessing Your Web Site Statistics 24
4. Under the Web Statistics section of the Hosting Control Center, click the Configure
Web Statistics icon.
Fig. 4.5 - Configure Web Statistics icon in your Hosting Control Center.
Accessing Your Web Site Statistics 25
With Linux shared hosting accounts, you can leverage your hard work and existing hosted
Web site content through the use of alias and sub domains.
Aliasing allows you to assign multiple domain names to one of your hosting accounts.
When users navigate to the alias domain, they see the hosting account's content. Subdo-
mains provide an easy way for users to navigate directly to a content sub directory on
your hosting account.
Note: The procedures in this section apply to hosting accounts running Hosting Configura-
tion 2.0. The hosting configuration you are running can be found in the Account Summary
section of the Hosting Control Center home page.
Depending on your hosting plan (Economy, Deluxe, or Premium), you are not limited to
pointing an alias domain at the root of your hosting account. Deluxe and Premium plans
can point an alias domain to any hosting content directory. Economy hosting plans allow
you to only point an alias domain at the root of your hosting account.
3. Next to the hosting account you want to modify, click Manage Account.
4. Under the Settings section of the Hosting Control Center, click the Domain
Management icon.
5. From the Domain drop-down list, select a domain in your shopper account or type a
domain name that does not exist in your account.
6. From the Domain Hosting Path drop-down list, select an existing content directory
or type a new content directory that does not appear in the list.
You can only create a Domain Hosting Path on our Deluxe and
Premium hosting plans.
It can take 4–8 hours for .com and .net domains and 24–48 hours for all other domain
extensions to become aliased.
There is no limit to the number of subdirectories you can use, but the path can be no
more than 70 characters.
4. Under the Settings section of the Hosting Control Center, click the Domain
Management icon.
5. Expand the appropriate domain name panel, and then click Add Sub Domain.
6. In the Sub Domain text box, enter the sub domain that you want to use. In this
example, we’ll create a sub domain called “newdirectory.”
7. In the Path drop-down list, leave <same as sub domain>. This will create a new
directory in your hosting account with the same name as your sub domain. In this
example, the hosting manager will create a directory called “newdirectory.”
8. Click Save.
It may take a few minutes for the Hosting Control Center to set up your sub domain. Once
this occurs, you can upload a test HTML file to your new sub directory and navigate to
either location below to verify content:
http://www.coolexample.com/newdirectory
http://newdirectory.coolexample.com
Where “coolexample.com” is your domain name and “newdirectory” is the name of the
sub domain you created.
Managing Domains and Sub Domains on Your Hosting Account 30
Use the root level directory (access to your entire hosting account).
8. Click Save.
6. Creating and
Connecting to a
Database
If your hosted Web site contains dynamic content or has data-driven, third-party applica-
tions installed, it needs a database to store information. Our Linux hosting accounts come
with an easy-to-use interface for setting up MySQL® databases.
If you are a more experienced Web developer or just plain feel lucky, you can also use
PHPMyAdmin to manage and set up databases for your hosting account.
4. Under the Databases section of the Hosting Control Center, click the MySQL icon.
6. Select your MySQL version. Enter a database description, user name, and password.
The user name doubles as the name of your database. User name and password let
you connect to your database.
7. Click Ok.
It may take a few minutes to create your database. You can click the Refresh button in
your browser to check and see if your database is ready.
Once you have set up a database for your account, you can click the Pencil icon next to
the name of your database to find your host name information.
3. Next to the hosting account you want to modify, click Manage Account.
4. Under the Databases section of the Hosting Control Center, click the MySQL icon.
5. From your list of databases, click the Pencil icon next to the appropriate database.
6. The Database Information page displays. The host name for your database
displays in this area.
CONNECTING TO A DATABASE
Once you know the host name, database name, user name, and password for you data-
base, you can connect to it using code (PHP, ColdFusion, Perl) or the configuration file for
your Web application. You need this general information to connect to your database:
Setting Explanation
Host name You can find the host name for your database on the data-
base information page in your Hosting Control Center.
User Name The user name you chose when you created your database.
Password The password you chose when you created your database.
Creating and Connecting to a Database 35
This is an example of PHP code that connects to a MySQL database. This script connects
to a database, queries a specified table, and prints the contents.
Notice the //Connect to Database section that contains all of the information you
need to connect to a database.
<?php
//Sample Database Connection Syntax for PHP and MySQL.
//Connect To Database
$hostname="mysql.secureserver.net";
$username="your_dbusername";
$password="your_dbpassword";
$dbname="your_dbusername";
$usertable="your_tablename";
$yourfield = "your_field";
mysql_connect($hostname,$username, $password);
mysql_select_db($dbname);
$result = mysql_query($query);
if($result)
{
while($row = mysql_fetch_array($result))
{
$name = $row["$yourfield"];
echo "Name: ".$name."
";
}
}
?>
For more information about MySQL and connecting to a MySQL database, visit the official
MySQL Web site at: http://www.mysql.com/.