Simple Server Response Checker With PHP and cURL

I often need to check website lists for error codes (yesterday I’ve told you about 4XX codes). There is a simple solution written in PHP that allows to d this. You need cURL support enabled (please, let me know if I need to describe cuRL installation process on my blog) and that’s all. Here is the code: <?… Read More »

Showing an Image on Remote Server Error

If you’re hotlinking images from other servers (this is often used when adding banner codes), you might face the situation when remote server becomes unavailable. This will spoil your site look, if you don’t add a simple code, that allows to solve this issue. <img src=”BANNER URL(REMOTE)” onError=”this.src=’LOCAL URL SHOWN ON REMOTE SERVER ERROR'” height=31 width=88> This simple… Read More »

How to Edit Crontab From Command Line

Editing crontab from command line In some cases you need to edit your crotab via command line interface. That’ s easy, but if you’ re not familiar with vi and its commands, you might have problems saving and editing cronjobs. First of all, let’s[ list your current crontab contents by issuing the following command: crontab – l This… Read More »

Adding Wildcard DNS Using Directadmin

Now to add wildcard DNS using DirectAdmin If you ‘re planning to use multiple subdomains within your account you will need to setup wildcard DNS resolving. There is an easy solution in DirectAdmin that allows you to do this without modification of certain configuration files. Just log in as admin and choose DNS administration tab under Admin Tools.… Read More »

Detecting High Server Load in Linux

For a long time I’ve been thinking that load average numbers that are produced by top command output truely represent server load. My first idea was that these numbers show me the percentage of relative server load, combining CPU usage, Memory usage, etc. Somebody even told me that this parameter should not exceed 3. If it is higher… Read More »

Disable Directory Listing Without Slash – Apache Config

Sometimes you need to deny directory listing on user input. For example, you don’t want your blog to be accessed at http://yoursite.com/blog, using only http://yoursite.com/blog/. This slash is added by mod_dir, that allows automatic adding of trailing slashes. A “trailing slash” redirect is issued when the server receives a request for a URL http://servername/foo/dirname where dirname is a… Read More »