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.

Dedicated Backing Up via Plesk

June 30, 2008

Any great web site out there, especially those on a dedicated sever, need to have an equally as great backup plan.  Thankfully if you are using Plesk, this is an easy process to step through.

First thing you need to do is login to your Plesk control panel, and then click on the "Back up" icon.  You can then backup locally or remotely.  For convenience, you can enter your FTP details and store them for future sessions.  To do so, click on FTP Account Properties and then fill out all the blanks, giving Plesk your FTP information to remember.  Now that you have that done lets backup our files.  Click on Create Backup on the main Backup page, and then you should see a screen labeled Backup file creation.

Now click on the backup method, either local, download or remotely on an FTP server.  You can also create a multivolume backup from here too.  Now under FTP settings, you should see that everything has been filled out for you.  Give your backup file a name, leave a comment to help your remember what it was about and also you can put in your e-mail address so you will be notified as soon as the backup is done.

When your ready, click on the "Back up" button.  After doing so you may wish to play with other options you have such as enabling backups on a schedule so you don’t have to actually login and do all of this to get it done each time.  You can also browse through the backup file repository too.

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.

What is a Rootkit?

June 24, 2008

As a webmaster, you know the importance of a good spam blocking and virus protection program, and maybe you have learned from our dedicated server tutorials how to set con jobs for scheduled tasks, how to protect your system or administer backups, but did you know that there may be things you are unaware of trying to hack your server?

One of these necessary evils of dedicated server hosting is called a rootkit. A rootkit is simply a program usually designed by hackers who attempt to take control of your dedicated server without authorization. They can gain complete access to your system or install themselves as drivers, kernel modules, or other malware. They often go undetected and can seize control of your operating system and obscure the presence of potentially harmful viruses, commands, or Trojans.

Oftentimes, once a rootkit has hidden utility programs in your system, they open a backdoor to your server at any time of the day and can thus be severely harmful to the health of your dedicated server.

If your dedicated web host has a Managed Hosting option, you should look into it, as they often perform rootkit checks to ensure the security of your dedicated server. Remember, a good dedicated web hosting provider doesn’t want your server brought down either and will do everything in their power to keep you a happy customer.

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.

Deploying Silverlight Applications on Your Dedicated Server

May 28, 2008

By now, you already know that Silverlight is one of the fastest growing media technologies in the world right now. So if you’re planning to get or already own a dedicated server to run as media server hosting, you’ve got to know a thing or two about deploying Microsoft Silverlight applications on your dedicated server. For example, did you know you can run and install Silverlight applications using a Linux or Windows server?

The good news is that deployment of a Silverlight app is incredibly easy, and our friends at Lunarpages Dedicated Server Hosting have provided this amazing and easy-to-follow tutorial for your convenience.

1. Upload Your Silverlight Application

First, you’ll need to upload the actual application folder under the document root of your account. If you’re on a Linux server, remember that file names, folder names, and links are case sensitive, so ensure these are all correct before proceeding.

2. Specify the MIME Mapping

Working with cPanel on a Linux server, you should first click on the MIME Types icon. It looks like this: Then, add a MIME Type application/xaml+xml with extension xaml.

Working with Plesk on a Windows server is just slightly more complicated, though not by much. First, click on the Web Directories shortcut on the Domain Management page and select the MIME Tabs tab. Add New MIME Type and put .xaml as extension, select content as Custom, and write application/xaml+xml in the next edit box, and click OK.

That’s it! In two simple steps, in Windows or Linux, you have effortlessly deployed your new Microsoft Silverlight application! And you probably didn’t even break a sweat. That’s how easy dedicated server hosting can be when you have great tutorials from great web hosting providers like Lunarpages.

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!