Log Files:
Log files are critical to managing Apache.
Managing these logs can provide advance security warnings, provide detailed information in terms of who is visiting your site and where they are coming from and can help you troubleshoot the use of your server resources. The two main log files are listed below from a Debian Squeeze Server.
The access_log file gives you information on who is using your web server and the error_log provides information for troubleshooting.

/var/log/apache2/access_log
/var/log/apache2/error_log

How to View Apache2 Logs:

View apache2 logs with tail and head:

The basic tail command will show the tailend of the log.

tail /var/log/apache2/access_log

You can use the -n option to view a specific number of lines  like in this example:

tail -n100 /var/log/apache2/access_log

Head is the opposite of tail.

Continue Reading…

The Spamhaus Project is one of the largest anti-spam DNS blacklist services known. Founded in 1998, Spamhaus has operations in Geneva, Switzerland, and London in addition to the 28 investigators and forensic specialists located in 8 countries. Spamhaus is a true 24 hour a day anti-spam operation. With over 60 public DNS Servers distributed across 18 countries, Spamhaus is able to serve billion of DNS requests to the world over, all free of charge. It has been estimated that 1.4 billion users mailboxes are in some way protected by The Spamhaus Project every day.

Here, I will show you a script that automatically blocks IPs blocked by Spamhaus:

#!/bin/bash

IPT=”/sbin/iptables”
FILE=”/tmp/drop.lasso”
URL=”http://www.spamhaus.org/drop/drop.lasso”

echo “”
echo -n “Deleting DROP list from existing firewall…”

Continue Reading…

An update to Debian GNU/Linux 6.0 is scheduled for Saturday, June 25th, 2011.
As of now it will include the following bug fixes. They can be found in “squeeze-proposed-updates”, which is carried by all official
mirrors.

Please note that packages published through security.debian.org are not listed, but will be included if possible.
Some for the updates below are also already available through “squeeze-updates”.

The point release will also include a rebuild of debian-installer.

Miscellaneous Bugfixes:

A complete list of all accepted and rejected packages together with rationale is on the preparation page for this revision:

<http://release.debian.org/proposed-updates/stable.html>

If there are any issues, please don’t hesitate to get in touch with the Debian Release Team at “debian-release@lists.debian.org”.

eAccelerator is a free open-source PHP accelerator & optimizer. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.

eAccelerator stores compiled PHP scripts in shared memory and executes code directly from it. It creates locks only for a short time, while searching for a compiled PHP script in the cache, so one script can be executed simultaneously by several engines. Files that can’t fit in shared memory are cached on disk only.

The latest release, 0.9.6.1, features support for PHP 5.3 and also works with PHP 5.1 and 5.2.

1. Installation:

apt-get update && apt-get upgrade && apt-get install php5-dev

Now  you  have to download and install eAccelerator from the eAccelerator website.

Now Install eAccelerator using the following commands:

cd /usr/src
wget http://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.tar.bz2
tar -xvfj eaccelerator-0.9.6.1.tar.bz2
cd eaccelerator-0.9.6.1
phpize
./configure
make
make install

2. Integrate eAccelerator in PHP5:

Continue Reading…

There is a simple way to call a simple bash script inside php script page:

– Below is a simple bash script called script.sh

#!/bin/bash
echo “Successful call test script“
exit 0

You will need to set chmod 700 to  be root executable. Then  save the script to your apache root folder.

There is a simple php script called testing.php

< ?php $script = “/var/www/script.sh”; $ver1 = system($script, $retval); if ($retval == 0 ) { echo “Returned 0″; } else { echo “Returned not zero”; } die; ?>

Continue Reading…

Page 25 of 44« First...10...21222324252627282930...40...Last »