Archive for the 'Linux Support' Category

SBDavid

Traceroute overview

Traceroute overview

Traceroute is a system administrators utility to trace the route IP packets take from a source system to some destination system.

Traceroute uses the IP TTL (Time To Live) parameter to find the route. It sends a packet with a TTL value equal to 1. The first router receives the packet and decreases the TTL. With a TTL equal to 0, the router sends a timeout back to traceroute, with this packet, traceroute knows about the first router. Now, traceroute sends another packet with a TTL equal to 2. The first router decreases the TTL and sends the packet to the second router which decreases it in turn: the TTL is equal to 0

Reference: http://traceroute.sourceforge.net/

SBDavid

Introduction to XCache

Introduction to XCache

XCache is a open-source opcode cacher, which means that it accelerates the performance of PHP on servers. It optimizes performance by removing the compilation time of PHP scripts by caching the compiled state of PHP scripts into the shm (RAM) and uses the compiled version straight from the RAM. This will increase the rate of page generation time by up to 5 times as it also optimizes many other aspects of php scripts and reduce serverload.

XCache is a fast, stable PHP opcode cacher that has been tested and is now running on production servers under high load. It is tested (on linux) and supported on all of the latest PHP.

It overcomes a lot of problems that has been with other competing opcachers such as being able to be used with new PHP versions.

SBDavid

Securing the /etc/services file

Securing the /etc/services file

Secure the /etc/services file to prevent unauthorized editing. If this file is editable, crackers can use it to enable ports on your machine you have otherwise closed. To secure this file, type the following commands as root:

# chown root.root /etc/services
# chmod 0644 /etc/services
# chattr +i /etc/services

This prevents the file from being renamed, deleted or having links made to it.

SBDavid

Customizing apache web logs

Customizing apache web logs

Custom formats for apache web logs, to record more information or to make them easier to read.

LogFormat

%h The remote host
%l The remote logname (usually just “-”)
%u The authenticated user (if any)
%t The time of the access
\”%r\” The first line of the request
%>s The final status of the request
%b The size of the server’s response, in bytes
\”%{Referer}i\” The referrer URL, taken from the request’s headers
\”%{User-Agent}i\” The user agent, taken from the request’s headers

Apache’s “LogFormat” directive is what lets you define your own access log setup. Let’s look at how that directive would be used to define the combined log format (CLF):

LogFormat “%h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\”" combined

That first argument, in quotes, is the string that describes the log format. The last argument, “combined”, gives a nickname to the format that can be used by CustomLog later on.

That format string contains a bunch of placeholders that describe the data to be included in the log. That first one, for example, is “%h” and represents the IP address of the visitor (the identifier for their host). A bit further on, “%t” represents the time of the request.

SBDavid

About FastCGI

About FastCGI

FastCGI is simple because it is actually CGI with only a few extensions.

Like CGI, FastCGI is also language-independent. For instance, FastCGI provides a way to improve the performance of the thousands of Perl applications that have been written for the Web.

Like CGI, FastCGI runs applications in processes isolated from the core Web server, which provides greater security than APIs. (APIs link application code into the core Web server, which means that a bug in one API-based application can corrupt another application or the core server; a malicious API-based application can, for example, steal key security secrets from another application or the core server.)

Although FastCGI cannot duplicate the universality of CGI overnight, the FastCGI developers are committed to propagating FastCGI as an open standard. To that end, free FastCGI application libraries (C/C++, Java, Perl, Tcl) and upgrade modules for popular free servers (Apache, ISS, Lighttpd) are available.

Like CGI, FastCGI is not tied to the internal architecture of any Web server and is therefore stable even when server technology changes. An API reflects the internal architecture of a Web server, so when that architecture changes, so does the API

« Prev - Next »