apache

SAWstats

SAWstats is an improved version of AWstats with the following additional features:

  • Native Nginx log format support (%codequot)
  • Native Squid logs support (%codesquid %timesquid %otherblanks)
  • Seamless support of monthly and daily views
  • Easy navigation between monthly and daily weekly views
  • Filtering of Drupal users (using DRUPAL_UID, see Apache recipe, Nginx can log this cookie as $cookie_DRUPAL_UID).

AWstats is a great tool for parsing and analysis of web logs with nice web interface, but after years it still lacks Squid support, so I decided to fork. The name "SAWstats" stands for "Severely Advanced Web Statistics".Read more

Installation of TBDev (torrent tracker)

Install PHP GD for captcha

yum install php-gd

Create virtual host with following PHP settings:Read more

wTorrent and RUtorrent: web UI for rtorrent

RuTorrent Installation

ruTorrent is preferred WebUI for rtorrent. Its installation is as simple as unpacking downloaded tarballs and changing a single parameter.

I chose the following components from download area (get all in a single package):Read more

Installing Apache2 and PHP5 using mod_fcgid

All this time I used to use Apache with prefork method (apache2-mpm-prefork) combined with PHP5 module (libapache2-mod-php5). Until the day my web server choking out of resources because lots of users accessing. Apache with PHP module consumes a lot of memory because each request is handled by one process.

When I was googling, I found that Apache2 using worker is more efficient and less resource consuming because one process can handle many request (by using multithreading). Read more

Using Nginx and PHP-FPM on CentOS

Disclaimer: this page is a quicksheet, stub. Proceed to related links for full info.

How to run it with Apache:

yum install mod_fastcgi 

mod_fcgid does not work!Read more

mkdir /var/www/php-fcgi
ln -s /var/www/drupal /var/www/php-fcgi/drupal

Pubcookie module for Nginx

ngx_http_pubcookie_module is a Nginx module which authorizes users using encrypted cookies. Its description is available in russian here.

Pubcookie is a third party module and is not included in the Nginx core.

This module is a port of Pubcookie for Apache. You can find description and example settings of Apache module here.Read more

Logging Apache's *_cache modules efficiency

Recently I had to setup several Apache web servers with an in-RAM cache for frequently accessed content with the help of Apache's mem_cache module. All the servers where front-end servers to application servers that sits behind.

Although in some cases the content expiration time was set as low as 30 seconds, it worked great because it reduced request concurrency for the most costly requests, providing an important performance improvement and reducing heavily the requests to the application servers. The problem comes when you want to log cache hits and misses in order to analyze cache efficiency.Read more

Story URL: 

Pubcookie problems with Drupal redirector

Let's describe a situation. Drupal is installed in the webserver root, and you want to guard a subdirectory on the server, which is completely separate from Drupal, by Pubcookie authentication. The problem is that Pubcookie internally uses another URL on your server named /Pubcookie.reply, and this URL gets intercepted by Drupal redirector. You can get various sorts of errors like "No granting reply". Pubcookie.reply is a magic URL that Apache knows how to reply to, but Drupal was rewriting it to index.php?q=Pubcookie.reply or alike. As a solution, add the following rewrite rule:

RewriteCond %{REQUEST_URI} !=/PubCookie.reply

Syndicate content