Tag Archives: servers

No Support Linux Hosting

We ignore the support questions and pass the savings on to you. Not lazy. Efficient.

That’s the slogan for No Support Linux Hosting, a company providing ridiculously cheap web hosting. You pay $1 per month for shared hosting with 1GB of disk space, a 10GB transfer caps, 3 MySQL databases, cPanel and 25 email accounts. Just one dollar.

It seems like a great deal for small websites or, as they suggest, someone looking to resell to clients. You pay $1 monthly to host a client’s website, charge them a few dollars, and handle the support yourself.

The billing system is interesting as well. You pre-pay a certain number of credits through PayPal, and No Support Linux Hosting dips into your pool of credits as necessary. The initial registration is free, as you don’t need to pay for anything until you actually start using the service.

$12/year for hosting is a pretty good deal. Couple it with $8.99 or so for a domain from your registrar of choice, and you can launch a website on a very tight budget.

Put Your Website in Maintenance Mode With .htaccess

Sooner or later you’ll probably run into a case where you need to put up a “maintenance mode” page while working on the site (e.g. while moving a site to a different server). What’s the best way of doing that? First you create a small, static HTML page that will appear to your visitors, then you put this at the top of your .htaccess file:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/berightback\.html$
RewriteRule ^(.*)$ http://example.org/berightback.html [R=307,L]

If you still need to be able to access the live site while you perform the maintenance, you can add a condition permitting requests from your IP address. This line should be placed after the RewriteBase / line:

RewriteCond %{REMOTE_ADDR} !^00\.000\.000\.000

Be sure to replace the zeros in 00\.000\.000\.000 with the digits from your own IP address, which you can find by visiting WhatIsMyIP.com.

Get Live Access Logs With a Simple Linux Command

Here’s a neat little trick for those of you with SSH access to your Linux server. You can use a simple command to get a live-updated stream of your access log, so you can see hits as they come in. It’s sort of like the “spy” tool in Woopra or pMetrics, but geekier and with less visual polish. :)

Linux "tail -f" on an Apache Access Log

First you need to connect to the server with SSH. Once you’re in, change your working directory to wherever Apache stashes its log files on your system. On my Ubuntu install it’s /var/log/apache2. So I would type cd /var/log/apache2 to switch to that directory. Next, run the tail command like so:

tail -f access.log

Tail normally outputs the last several lines of a file and then returns to a prompt, but with the -f argument it continues to monitor the file for changes, and outputs them. So as the Apache server writes to the log file, tail spits the new lines out on your screen.

When you’re done, press Ctrl+C to terminate the tail process and go back to the shell prompt.

Saving Bandwidth and Speeding Up Your Site With GZIP and Browser Caching

There are a couple of easy adjustments you can make to your web server in order to decrease page loading times, save bandwidth, and reduce load on the server. All you have to do is add a couple of code snippets to either your Apache server configuration file (httpd.conf or apache2.conf) or an .htaccess file.

Note that these require that your server have certain modules installed for this to work. You will need either mod_deflate or mod_gzip for GZIP compression and mod_expires for the browser caching trick.

Enable Browser Caching

When a web browser loads a page, it checks each item it requests (JavaScript, CSS, images, etc) against its local cache. If an item, say the stylesheet, hasn’t expired yet, then it will load the local copy instead of requesting a new one. Now if you were to instruct your server to set the expiration time for images, CSS, and JavaScript files to one month from the present, users viewing multiple pages of your site (even across multiple days) won’t tax your resources as much, as they will use the copies of your stylesheets and images that have already been downloaded.

Continue reading →

Stack Overflow, Super User, Server Fault: Your Tech Questions Answered

Stack Overflow, Server Fault, and Super User are a set of interesting sites by Jeff Atwood, the blogger behind the Coding Horror blog. Back when Stack Overflow launched in 2008, Jeff described it like this:

Stackoverflow is sort of like the anti-experts-exchange (minus the nausea-inducing sleaze and quasi-legal search engine gaming) meets wikipedia meets programming reddit. It is by programmers, for programmers, with the ultimate intent of collectively increasing the sum total of good programming knowledge in the world.

I couldn’t have said it better myself. It’s sort of like Reddit or Digg, but centered around answering everyone’s questions instead of sharing links. If you want to know the best way to go about doing something in PHP or Python, pose your question on Stack Overflow and watch as you receive at least one thoughtful answer within the half hour.

Continue reading →

It’s Time for PHP 4 to Be Retired

On December 31, 2007 the PHP Group discountinued support for PHP 4. Since then, there have been no updates to the branch, security or otherwise. PHP 5 is the currently supported branch, and it is far superior to its predecessor.

Web hosts have, for quite some time, delayed upgrading their servers to PHP 5, despite its many advantages. (SimpleXML and better tools for OOP are just a couple invaluable tools that PHP 4 lacks.) Their favorite claim is that it will break everyone’s scripts.

The only scripts that PHP 5.2.x would break are badly-written ones. Popular packages such as WordPress, Joomla, phpBB all work on PHP 5, and some are even dropping support for PHP 4. The only scripts that will have compatibility issues are custom badly-written scripts, and the required updates would be minor. One of the biggest issues would be register_globals, and that could be remedied with some quick updates to scripts, or by turning it back on.

It’s been put off long enough. Web hosts, upgrade to PHP 5 already! The time is long past due.

How to Set Up a Linux Server

Since I’ve been planning on moving to a VPS server sometime in the coming months, I’ve been reading up on server administration. How to set up Linux to serve web pages and parse PHP, how to not leave the door wide open to attackers, how to manage Apache, all that jazz. It’s all rather complicated at a glance, though luckily not too much so once you get into it. I’m doing my best to prepare myself so I’m not overwhelmed when the time comes to switch servers.

The folks over at NETTUTS must be psychic or something. They seemed to know that I was semi-actively looknig for information on this topic, since they recently published a tutorial on setting up an Ubuntu webserver. I had a “well that’s cool” moment when I saw it in my feed reader.

Continue reading →

Ding, It’s Up: Know When a Site Comes Back Up

DING, IT’S UP is a fairly new service that repeatedly pings a website you specify and lets you know when it goes down, or when it comes back up. It can send you an alert via email or by Twitter.

Want to know when Twitter comes back after their most recent downtime? Tell Ding It’s Up to send you an email when the site becomes available again.

Would you like to know if your website has some unexpected downtime? Just input your domain name and pick either a Twitter or email notification, whichever will get to you sooner.

The site is very simple, just the bare essentials. Not even a logo. Just a simple form to fill out, and a paragraph of text under it.

Just don’t try to get a Twitter notification of when Twitter.com goes down. It won’t work very well. :)

Linux and Mac Servers Have Less Downtime

A recent study conducted by Pingdom shows that Linux and Mac servers have a lot less downtime than those running a Microsoft OS.

The data is based off the uptime of the individual companies’ websites. Apple, Microsoft, Red Hat, Slackware, and the others listed all use their own operating systems to run their servers, and you would expect them to put a bit of resources into making sure their sites are as reliable as possible, correct? After all, would you use a server OS from an organization whose website goes down frequently? Normally a product’s website speaks well for the product’s reliability, or so many people assume anyway.

Continue reading →