Shared hosting versus VPS downtimes

Question:

How often should I expect downtime on a shared account versus a VPS?

Answer:

If you picked a random shared server, you could expect about one five minute outage every 5 months due to kernel upgrades. This is an average because there is no way to tell for certain when new (required – security related) kernels will be released. Think of a kernel update as a required security upgrade that needs a reboot to be installed.

On a shared server other outages are totally dependent on the machine itself and the hard to foresee mix of user websites loaded onto it. On a shared machine it is very hard to 100% stop a user with problems from affecting everyone else.

On a VPS you are in a much better position. You still have occasional reboots for kernel upgrades (we handle these automatically for you). All other parts of your server are totally private so you do not need to worry about other users causing downtime. As long as your own scripts do not cause out of memory and and other problems your VPS should run without issue.

Fastest guide to git

Note: a few older servers may not have git installed. If you need git added to your server, contact support

Here is how to quickly store all your files in git:

1. ssh to the server

2. type:


cd ~/
git init
git config user.name "Your name here"
git config user.email "your-email@here.com"
git add .
git commit -m "Initial commit"

make some changes, then

cd ~/

If you have created new files, add them to git. Either add them all with :

git add .

or add them individually with:

git add file1 file2 path/to/file3 file4 long/path/to/this/file

etc.

Finally, commit your changes:


git commit -m "Version 2"

In all these examples we use git to backup our entire home directory by performing:

cd ~/

at the start of each checkin/add/etc.

There are many arguments against this and you are of course welcome (and perhaps even advised in most cases) to cd instead to the directory your project is in.

Git Branches

If you would like to make some changes to your working code (or have already made changes and want to revert back quickly), type:

git branch experimental

(you can use whatever name you like in place of “experimental”)

git checkout experimental

Make your changes (if you haven’t already made some), then type :

git commit -a

Your changes are now committed into the experimental branch.

To get back to your working code, type:

git checkout master

and you should be back to your working version of the code.

To totally abandon all your changes and go back to the last checked in version in your current branch:

git reset --hard HEAD

Which php global contains the user IP Address?

Question:

Which php global contains the IP address of the user/client calling the script?

Answer:

$_SERVER['REMOTE_ADDR'];

Note that this does not take into account any proxy which might be in use. There are numerous issues to take into account if you wan to to be absolutely sure of the remote IP. This example is for the simplest cases.

$user_ip = $_SERVER['REMOTE_ADDR'];

echo "

your IP is $user_ipn";

Adding Silverlight support to Apache (mime.types)

Question:

Do I need to make any changes for the Apache webserver to support Silverlight apps?

Answer:

In most cases, no changes need to be made.

If you are having problems, try adding:

application/manifest manifest
application/xaml+xml xaml
application/x-ms-application application
application/x-ms-xbap xbap
application/octet-stream deploy
application/vnd.ms-xpsdocument xps
application/xaml+xml xaml
application/x-silverlight-app xap

to your mime.types file

Don’t forget to restart apache with:

/usr/local/apache/bin/apachectl graceful

after you make the change.

IMAP php extension versus IMAP email

Question:

I’m confused about the difference between the php IMAP extension and and IMAP server.

Answer:

The php version on your server has the php extension for accessing IMAP mail servers. However, this extension only allows php to connect to an IMAP server. It does not actually provide an IMAP server. By default most accounts are not configured for IMAP mail service. We can upgrade you to a mail server that does (no extra charge) – contact support to have the IMAP mail server upgrade performed.

If you simply want to connect to other IMAP mail servers, you do not need to do anything. If you want to connect to your own mail via imap/webmail you’ll need to upgrade to an IMAP mail server with us. As a side-note, part of the IMAP conversion process also gives you access to a pre-installed version of roundcube (you are still welcome to do your own roundcube install if you prefer).

External VPS firewall options

Question:

Is there an external firewall for my VPS?

Answer:

By default there is no firewall for your connection. Your VPS provides excellent firewalling via the built-in iptables firewall/filter. You have full control over iptables to firewall traffic as you see fit.

We do reserve the right to firewall ports externally if any problems would occur – attacks, spam problem, etc.

As an example, if your server were to be compromised and attacked others we may firewall all ports except ssh until you are able to connect and fix the problem, etc.

VPS monitoring

Question:

Can you monitor my VPS?

Answer:

By default we perform monitoring of the physical node only. However we can also can provide informal monitoring of your httpd as well. To start monitoring, send us a message when your VPS is in production and we’ll monitor httpd. If it goes down, we’ll attach and investigate. If it is a simple issue, we will make any needed changes and restart. If you have made previous plans for extended support our engineers can perform “what-ever-it-takes” measures to put your httpd back online. Without a prior agreement, we’ll wait for you to connect and investigate the problem. Our staff does want to see you back online asap but without a previous plan and knowledge of your particular configuration it can often cause more harm than good for our staff to start adjusting your configuration.

As always, you can contact support and we can setup a support agreement that is best for your needs.

VPS maintenance – upgrades, security, etc.

Question:

How does maintenance work on a VPS?

Answer:

Regarding maintenance, we handle all kernel updates (openvz/virtuozzo uses a shared kernel approach so kernel modifications can only be done by us on the host node). To avoid surprises, all other updates are left to you as the administrator of your server to perform. Once you have your VPS you are free to change, modify, delete anything you like so it is not practical for us to make updates as we may mistakenly break things you modified if we did updates.

The one exception is that we reserve the right to force upgrades in a critical situation. For example, if there was a new “0 day” exploit for ssh we would (at our discretion) attach to your VPS and force an upgrade. This option is reserved for rare cases where, in our judgment, it is critical that an update be applied.

If you need full maintenance of your VPS, contact support and we can set up a separate support agreement for your VPS.