Apache
PREVENTING BANDWIDTH THEFT USING THE MOD REWRITE ENGINE AND .HTACCESSHOW DO I STOP THIS THEFT? The Apache Server's Mod Rewrite Engine (which must be compiled into your server to allow you to do this) can examine the name of the document requesting a file of a particular type. You can then define logic that basically does the following: If the URL of the page requesting the image file is from an allowed domain, display the image- otherwise return a broken image. |
|
Redirecting Your Reader to a CGI script when an error occurs.Redirecting your readers to a CGI script works exactly like sending them to an HTML page from their perspective, but it can be a timesaver for you as a webmaster. By calling a script, you have the opportunity to both handle the reader, and log the information. This can help you track down problems a lot faster than searching through your logs for errors. |
|
Redirecting Your Reader to Special HTML Pages when an error occurs.Rather than showing a simple text message when an error occurs, displaying a friendly message along with a link to follow back to a real page is a nice touch. I suggest that you keep the message brief and polite. Do not consider every user caused error some type of intrusion attempt. Anyone poking around with any |
|
Stopping People from Using Your Images on their Web Pages. (Bandwidth Theft)If you have some nice graphics on your site, you might notice that other webmasters, usually newbies are having their readers pull the graphics directly from your site. If your bandwith is metered, then you are paying to support somebody else's site! Depending on how busy that other site is, it can also place additional load on your server. |
|
THE APACHE SERVER STATUS & ERROR CODESSuccessful Client Requests Client Request Errors Client Request Redirected Server Errors |
|
THE BLACKHOLE CURE FOR UNWANTED GUESTSNot all spiders read the robots.txt file, nor do they bother to advertise their identification string. So, you notices that your site is being trounced by something that is draining your resources and will not go away. To the host that is causing you the problems, it will give the appearence that you are no longer on the air! Of course, make certain that you are not locking out a legitimate search engine. |
|
THE COMMON SENSE GUIDE TO APACHE SECURITYYou are the biggest threat to your own site! The odds of damage occuring due to a malicious attack are quite smaller than your chances of doing something to upset the balance of life in your server. NEVER RUN YOUR SERVER AS ROOT In the land of Unix, god is a four letter word, root. Do not under any circumstances allow your web server to run as root. Let me clarify this. Do not run your web server as root. Just in case you missed this point, do not run your web server as root. While you are at it, do not let your web server run as any user with administrative privileges, such as lp, bin, daemon. Also, make certain that your web server is in a group of its own, and not a member of any user or administrative group. |
|
USING .HTACCESS & HTPASSWD TO PROTECT YOUR FILES FROM UNAUTHORIZED ACCESSIt is possible there are parts of your site which you would prefer that not just anyone have access to. APACHE and other web servers provide a system that you can use to control access to certain directories on your website. You might have a family photo album on line that you want only your family to see. No matter what your little secret is, I will show you how to help keep private things a little more private. |
|

