Main menu:

Site search

Categories

Archive

Archive for 'Apache'

How to find what robots have visited my website

Ever wonder how to find out what robots/crawlers have visited your site? If you don’t have robust log analyzer there is another way. If you are using apache there is a simple way from the command line to figure out how as been visiting. grep robots.txt /etc/httpd/domlogs/bumideas.com|awk -F ‘”‘ ‘{print $6}’|sort -k 1|uniq -c What [...]

Changing the default file via htaccess

htaccess has a ton of special operations available in it.  One useful is to override the default file that is served up by the server for a directory. A web server typcally has index.html, index.htm, or something similar as the default Simply locate your .htaccess file and open it for editing with your favorite editor [...]

Where to get mod_security rules?

Mod_security is an awesome tool to scan query strings for malicious content…blocking it before it ever enters execution. One of the best resources I have ever found to get some mod_security rules. They have both rules for versions 1 and 2. These rules block hundreds of attempts on my server every day. http://www.gotroot.com/downloads/ftp/mod_security/rules.conf

How to solve the PHP Error Warning: Cannot modify header information

That message is the bane of anyone that used the header function to forward to a new Location. Any output from PHP before that command will cause it to fail with a Warning: Cannot modify header information – headers already sent by… Things to check… Look at the :number in the message “headers already sent [...]

How to install Zend in cpanel/whm

pretty darn simple to do… To install Zend Optimizer: 1. Login to your server via SSH 2. Run: /scripts/installzendopt 3. Follow the instructions on the screen to install Zend Optimizer

What the ????? upgrade to php 5.1 and I get broken PNG… gd-png: fatal libpng error: zlib error in

So I did an upgrade from php 4.2.2 to 5.1.something… and now my PNG that are dynamically created on the fly are all broken… I found the solution. After looking in the error logs for apache and finding the following gd-png: fatal libpng error: zlib error in I went and check the manual for imagepng. [...]

Upgrading PHP in cpanel from version 4 to 5

One thing to be aware of when doing the upgrade of cpanel via the WHM control panel, is that when you select your new version for the apache build, it unselects the check box for including PHP in the build. When the Build is complete running, you will have a PHP dead version of apache…. [...]

Apache logs when running cpanel

In case you have ever looked at the raw logs in the usr/local/apache/domlogs and noticed that they are getting truncated each night, it might not be logrotate.d after all. In cpanels tweak settings there is an option to have the logs deleted after stats runs. Best bet is to uncheck it and do some custom [...]

mod_rewrite rule generator for .htaccess

this is a link to a cool little tool that will take a messy URL and translate it into a rule for use in mod_rewrite and .htaccess to clean it up and make it SEO friendly http://www.webmaster-toolkit.com/mod_rewrite-rewriterule-generator.shtml of course this will require apache and mod_rewrite to work…