What Are SSI

July 21, 2008

Dedicatedserverhosting.com was designed to give you an in-depth look at managing your dedicated server, along with helpful resources to purchase servers, upgrade, or decide what kind of server is right for you. That often includes defining lesser known dedicated server terminology that you are probably unfamiliar with.

One such term in the server realm is “SSI”, which stands for Server Side Includes.

What are SSI?

SSI are directives that are placed inside normal HTML webpages and which can be evaluated on the physical server as your website loads and serves the pages.

What can SSI Do For Me?

SSI can add another layer of dynamic content to your existing HTML pages without having to go through the serving process via CGI or other dynamic website technology. This eases the strain on your website, allowing for faster loads and more dynamic retrieval.

One word of warning about SSI, though – it is best used for loading small pieces of your site, like the current time, etc. However, if you are looking for a solution that will assist with larger portions or applications, SSI will not really do the trick.

Overall, SSI can help balance your dedicated server hosting by easing the load of running small parts of your site.

LAMP Setup on Your Dedicated Server - Step 2 of 3 - Configuring PHP

July 1, 2008

By now you have already installed Apache onto your dedicated server. Now, let’s configure Apache to run with PHP4 or PHP5, whichever is your preference in scripting.

For PHP4, it’s as simple as apt-get:

apt-get install apache2 php4 libapache2-mod-php4

Since PHP5 can be automatically installed if you don’t specify the package ‘4’, you can do that or apt-get:

apt-get install apache2 php5 libapache2-mod-php5

To test and ensure that you are now hosting with PHP4 or PHP5, create a test file called test.php in /var/www folder with phpinfo() function as follows:

nano /var/www/test.php

# test.php

php phpinfo();

Now, just point your web browser to http://ip.address/test.php and you’ll be able to see your php config and default settings. If you don’t, check with your dedicated server administrators or web hosting provider.

From there, you can also edit necessary values or setup virtual domains, enable CAPTCHA, and more.

LAMP Setup on Your Dedicated Server - Step 1 of 3 - Installing Apache

June 26, 2008

LAMP web hosting is probably the most popular and affordable server setting for webmasters these days. If you aren’t already aware, LAMP stands for Linux, Apache, MySQL, and PHP and defines how your dedicated server will run – it will be Linux hosting with an Apache server, MySQL databases, and PHP development.

The first step to create a LAMP server setup is to install Apache on your Linux machine.

1) Download Apache from Apache Software Foundation.

2) Uncompress the archive using gunzip and tar and replace apache_1.3.11.tar.gz in the example here with the name of the current live version you just downloaded:

gunzip < apache_1.3.11.tar.gz | tar xvf –

This should create an apache_1.3.11 directory.

3) Move into the new directory you just created and use cd apache_1.3.11.

4) ./configure in the root so that your screen appears as such:

# ./configure
Configuring for Apache, Version 1.3.11

Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
+ configured for Linux platform
+ setting C compiler to gcc
+ setting C pre-processor to gcc -E
+ checking for system header files
+ adding selected modules
+ checking sizeof various data types
+ doing sanity check on compiler and options

Creating Makefile in src/modules/standard

5) make so that your screen looks like this:

# make
===> src
make[1]: Entering directory `src/httpd/apache_1.3.11′
make[2]: Entering directory `src/httpd/apache_1.3.11/src’
===> src/regex

[several lines later]

gcc  -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite

-DNO_DL_NEEDED `../apaci` -o ab   -L../os/unix

-L../ap ab.o -lap -los  -lm -lcrypt

make[2]: Leaving directory `src/httpd/apache_1.3.11/src/support’
<=== src/support

make[1]: Leaving directory `src/httpd/apache_1.3.11′
<=== src
#

6) Install your new Apache with # make install and you’re done!

Now you are welcome to start Apache to make sure it’s working if you’d like.

As root, type /usr/local/apache/bin/apachect1 start and your browser at your brand new web server at yourdomain.com. If you see the Apache standard “It worked!” homepage, you are set.

Rootkit Detection Tools

June 25, 2008

What is a Rootkit?

Rootkits are programs designed to access your dedicated server systems to intrude on and compromise your server. These rootkits are often designed as Trojans so that you do not suspect but can open a backdoor to your dedicated server so that they can attach and upload suspicious programs and applications to degrade your performance or bring down your website.

What is Rootkit Detection?

Rootkit detection can be handled in two ways:

  1. Via Managed Hosting from your dedicated web hosting provider.
  2. Via rootkit detection programs, which are a way you can self-manage your web server.

How do rootkit detection programs work?

Rootkit detection software is designed to detect rootkits and distinguish them from normal hidden files that are not suspicious and concealed for a purpose either by you as a webmaster or by the operating system by default. Most often, rootkit detection programs compare various views of your server system to find mismatches. When there is a mismatch, it usually points to something suspicious and the rootkit check will alert you to suspicious software, programs, Trojans, spyware, or malware on your machine.

Originally, rootkit checks would perform a check on the entire dedicated server system to view all files while inside the OS and then boot the Recovery Console to see that file list for comparison. In the second list, the rootkit program will search for files that do not show up in the first list. These hidden files are often rootkit culprits!

Do they work?

As with all software programs, it depends. Rootkit management programs are not meant to be used as a standalone system for customers new to dedicated server hosting. If you fall into that category, you are still better off purchasing Managed Hosting from your dedicated service provider, as they are professionals who will know the difference between default hidden files and corrupted malware.

Also, take note that rootkit programs are sold or downloaded AS IS, so there is never any guarantee of their success.

Blocking an IP Address on Your Dedicated Server

June 18, 2008

You may be thinking why do I want to block IP addresses from my dedicated server? If you have never run a dedicated server before, you might not be aware that there are people who attempt to hack entire servers to bring websites down. There are many types of server attacks, and one of the most popular can occur from a single dedicated IP address – a DdoS attack!

In order to subdue the attacker and ban them from coming back, you will need to block their IP address from your dedicated server entirely. Luckily, you can do this in one simple step.

Add the following code to your .htaccess file, which can be found in your web server’s document root directory. More than likely this is named public_html, httpdocs, or webdocs.

<Limit GET>
order deny,allow
deny from 209.23.123.110
</Limit>

Adding this to .htaccess will block a single IP across your entire website and server! Be aware though: spammers and hackers alike can change their IP addresses very easily and most IPs that come from a home computer, for example, are not static and may update often. You can always add more IPs to your server, but this really showcases the importance of having a workable managed hosting solution on your dedicated server.

Monitoring Site Resources and Stats in Plesk

June 13, 2008

Do you want to keep yourself updated to know what you’re using on your dedicated server and when? This kind of information can be especially helpful if you are allotting a certain amount of disk space, bandwidth, or email accounts to specific clients on your dedicated server. Plus, knowing what you are using and how often will assist you in keeping your server up to date and if you need to upgrade, you will know before any issues arise.

In Plesk, via Windows or Linux hosting, you can find this information easily.

First, click on Limits

Limits displays the resource limits allocated to your account. For example, it shows you the maximum number of subdomains allowed, disk space, maximum traffic or bandwidth, maximum number of web users, maximum number of databases, maximum number of mailboxes, mailbox quota, maximum number of mail redirects, maximum number of mail groups, maximum number of mail autoresponders, maximum number of mailing lists, and a ton more.

To see account resources limits and usage, click on Report.

Report options will display all resource limits and usages, as well as users and a full list of all available scripts, utilities, and resources. For example, you’ll see Web Statistics, Web Stats, Web Stats SSL, FTP Stats, Traffic History, and can manage Report Delivery.

If you click on FTP Stats, this will show you a history of FTP activity in your website, both in upload as well as download.

If you click on Traffic History, this will display information on traffic usage by Months and Years.

To view detailed traffic statistics used by various services at the domain, click on the Traffic button.

If you’d like to keep yourself updated, you can also choose to send a copy of the report to any email you specify.

Or, you can setup a schedule for automatic delivery of reports by clicking on Report Delivery.

Accessing this information can assist you in self-managing your dedicated web hosting.

Managing Crontab Using Plesk

June 12, 2008

We have already gone over the importance of using cronjobs to manage your Dedicated Server, as these scheduled tasks assist you in self-managing. This will save you time, staff, and money in the long run, especially because they are so incredibly easy to setup! Crontab will allow you to automatically run scheduled tasks on the server, and if selected, receive automatic emails showing the results. These email updates can really save you hassle, as you will know that each task has been completed and what the results were immediately.

Using Plesk on Linux or Windows dedicated servers, you can manage your crontabs effeciently by simply following these easy steps:

Click on Crontab and then select the name of user who you want to manage the crontab. There should be a dropdown box of all the users listed on your dedicated server. You can also choose as an optional step to have emails sent to whatever address you provide. If you don’t want emails, don’t enter an address in this box:

Next, click on Add New Task which is the small Clock Icon you see in the upper left.

From there, you’ll need to enter the specific paramaters to set the frequency of the task. Enter * to select all. For example, you can set options to run crontabs every minute, every 2 hours, every Monday of each week, and every month of the year. Then simply enter the path to the file that will execute the crontab: i.e. /usr/bin/python-s/var/mailman/cron/checkdbs and click OK:

Afterwards, you’ll be able to assure the task has been successfully setup. If you ever need to modify an existing task, simply click on the name of the cronjob listed under “Command”. To delete existing tasks, check the box next to the command and click on “Remove selected”:

Accessing phpMyAdmin and MySQL with Plesk

June 6, 2008

Windows web hosting and MS SQL databases go hand in hand, just like Linux web hosting and MySQL are the most compatible. But what happens if you’re looking to use MySQL with your Plesk control panel in your Windows Server Hosting account?

Here’s a simple tutorial that should help you access phpMyAdmin using Plesk.

First, you’ll want to login with the username and password you got from your dedicated web host.

In order to access phpMyAdmin, you must first have created a MySQL database, so if you have not done that yet, do so now before you proceed.

Once the database with MySQL has been created, click on the “Database” icon in your Plesk control panel and choose whichever database you want to manage. Finally, click on the “DB WebAdmin” icon, where a popup window will open for phpMyAdmin.

NOTE: If nothing pops up, your popup blocker might be preventing this, so double check your settings and proceed once you can access the phpMyAdmin popup.

From there, you can edit tables, fields, data, and perform backups and delete your MySQL databases, right from phpMyAdmin!

If you’re using cPanel, it’s a bit easier: simply click on the icon above the words “MySQL Databases” on the main cPanel interface screen and then you’ll see phpMyAdmin and you can go from there!

So either way, whether you’re using Plesk or cPanel, you will be able to access phpMyAdmin with your dedicated server.

Setting Up Private Nameservers on Your Dedicated Server (Part 2 of 2)

May 22, 2008

Step 6: Edit Files in SSH Shell

Login to your SSH Shell into your server as root and open the following 2 files to edit using the information below:

* file 1:
nano /etc/resolv.conf

From there, the file needs to be edited. Make sure it looks like this:

domain yourwebsite.com
search yourwebsite.com
nameserver 127.0.0.1
nameserver IP1
nameserver IP2

At this point you should save by typing ctrl+o and entering. Then, close the file by typing ctrl+x.

* file 2:
nano /etc/nameserverips

The file needs to be edited, just like File 1. Make sure it looks like this:

IP0=0
IP1=ns1.yourwebsite.com
IP2=ns2.yourwebsite.com

**Please note IP0=your server IP**

Save and close as per File 1.

Step 7: Setup Nameservers in WHM

In WHM, select Edit Server again and set your Primary Nameserver to ns1.yourwebsite.com and assign the IP Address once more – it should now be the correct IP. Then click Add an A Entry for This Nameserver and repeat the process for the Secondary Nameserver using ns2.yourwebsite.com. Make sure you save.

Then you can double check that everything is setup properly by selecting Manage Nameserver IPs in WHM. If you see the 2 IPs and nameservers, you’re all set.

Step 8: Reboot Your Dedicated Server

Get into the Shell via SSH as root and type the simple command: reboot

Step 9: Point Your Domain Nameservers

If you host with LPDedicated.com or Lunarpages, you can login via the instructions in our previous post to manage your domain nameservers. Make sure they are pointed correctly, and once they fully propagate (24 hours or so), your nameservers will be listed properly and your website will resolve on your dedicated server!

Setting up Private Nameservers on Your Dedicated Server (Part 1 of 2)

May 21, 2008

When you purchase a dedicated server hosting plan, you will need to specify which nameservers you want to use. Unlike shared web hosting where you can only use your web host’s company name servers, with dedicated web hosting you can create your own private nameservers! This means your website will point to ns1.yourwebsite.com and ns2.yourwebsite.com

Step 1: Register Your Domain Name

If you purchase dedicated web hosting with LPDedicated.com, you can get your domain name registered for free. Otherwise, you can purchase the domain from a domain registrar or if you already have it purchased, just skip this step.

Step 2: Purchase 2 Dedicated IP Addresses

LPDedicated.com provides 2 Free IP Addresses for your dedicated server, both of which can be used for this purpose. Otherwise, IPs normally cost under $5 per IP per month.

Step 3: Register Your Nameservers

If you purchased hosting with LPDedicated.com or Lunarpages, you can do this easily. Simply read through this quick tutorial on Registering Your Name Servers. If you purchased through an outside domain registrar, contact them and let them know you need to register your domain as a nameserver. Most registrars normally take about 3 days to propagate.

Step 4: Fix NDC

You’ll need to login via SSH into your server at the root and run the following command:

/scripts/updatenow
/scripts/fixndc

Then, if you’re hosting with LPDedicated.com, in WHM on the left window pane, restart DNS/Nameserver (BIND). If you’re hosting elsewhere, check with your provider for further instructions.

Step 5: Set Up Your Nameservers in WHM

Visit your WHM panel again, and select Edit Setup near the top fo the left window pane and then set the Primary Nameserver to ns1.yourwebsite.com. Then assign the IP Address and repeat the process using ns2.yourwebsite.com for the Secondary Nameserver. Make sure you save your work!