Tag archive for ‘web server’

Mapping subdomains to parametered web pages in Apache

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 [...]

How-to locally Disable Python CGI scripts

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 [...]

How to upgrade chrooted lighttpd web server

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 [...]

Lighttpd Deny Access To Folders / Directories

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: [...]

Lighttpd prevent image hotlinking or leeching or direct linking

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 [...]

Lighttpd Install mod_geoip For Country / City Level Geo Targeting

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. [...]

Set HTTP Expires header

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. [...]

wtop – Apache Web Server: Log Analysis and Server Status Monitoring Tool

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 [...]

Client certificates with apache

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: [...]

Troubleshooting Lighttpd Chrooted RedHat PHP Version 5.1.6-20.el5_2.1

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 [...]

Enter your email address:

Liên Kết Website

web design | Shared linux windows problems | Dedicated server | website chất lượng cao | hosting chất lượng cao | Tutorial video collection | Troubleshooting Tips and Tutorial