April 23rd, 2013 |
admin |
Mapping john.webserver.com to http://www.webserver.com/user.php?name=john is just by changing a few parameters in http.conf file In httpd.conf file, <VirtualHost se.rv.er.ip.ad.re.ss> ServerAdmin info@servername.com DocumentRoot /var/www ErrorLog /var/log/apache/apache-error.log TransferLog /var/log/apache/apache.log ServerName www.servername.com ServerAlias *.servername.com RewriteEngine on RewriteCond %{HTTP_HOST} !^www.* [NC] RewriteCond %{HTTP_HOST} ^([^\.]+)\.servername\.com RewriteRule ^/$ http://www.servername.com/user.php?user=%1 </VirtualHost> The lines for this feature, RewriteEngine on activating rewrite option RewriteCond [...]
March 29th, 2013 |
admin |
Since the beggining of this blog, my collection of python scripts were not readable. This was due to the fact that files with .py extension are seen by the apache web server as CGI scripts. To tell apache that python files can be published as-is, put a .htaccess beside your files. Then edit it to [...]
March 28th, 2013 |
admin |
If you are running chrooted lighttpd web server, upgrade procedure is a bit tricky. You need to upgrade webserver, as well as php and related extensions. Following is common sequence you need to follow. I am just going to write down all steps, followed by actual Linux commands. If you need detailed instructions, please see [...]
March 14th, 2013 |
admin |
If users try to open a Web page (http://example.com/dir1/file.php); I’d like to display a “URL Access Denied” message for /dir1/, /www/, and /dir2/cache/ directories under lighttpd web server? How do I configure lighttpd to deny access to directory? The mod_access module is used to deny access to files and directories. Edit /etc/lighttpd/lighttpd.conf file as follows: [...]
January 6th, 2013 |
admin |
Hotlinking or leeching or direct linking comes under Bandwidth theft (also known as Inline linking). Wikipedia defines Inline linking as: Inline linking, also known as hotlinking, leeching, or direct linking is the placing of a linked object, often an image, from one site in a web page belonging to a second site. The second site [...]
November 12th, 2012 |
admin |
Geolocation software is used to get the geographic location of visitor using IP address. You can determine country, organization and guess visitors location. This is useful for a] Fraud detection b] Geo marketing and ad serving c] Target content d] Spam fighting e] And much more. mod_geoip is a Lighttpd module for fast ip/location lookups. [...]
October 18th, 2012 |
admin |
With Apache, one easy way to do this is to generate a link that contains a build/version number or date in the path, e.g: /css/{build-number-or-date}/file.css In Apache, in your configuration file (e.g. .htaccess if that is all you have access to) you can set the Expires header and rewrite your url to the real location. [...]
September 19th, 2012 |
admin |
How to Install and Configure wtop – Apache Web Server Log Analyser wtop is really cool application for web server log analysis and to see server stats at a glance. It also has powerful log grepping capability. It is just like ‘top’ for your webserver. It can find out number of searches or signups per [...]
September 14th, 2012 |
admin |
How to use client certificates with apache This How-To is intended to give a step-by-step configuration guide for creating your own certificate authority (CA) and how to configure apache to allow only certain self-signed user certificates to connect to the webserver. Any other browser connects will be discarded. So let’s start with the requirements. Requirements: [...]
September 5th, 2012 |
admin |
It appears that latest php version 5.1.6-20.el5_2.1 under RHEL / CentOS Linux v5.2 has made some major changes. As a result choort jail setup using previous instructions no longer works. PHP is crashing with segmentation fault errors. So I had to trace php errors using strace command. After spending couple of hours I found solution [...]