httpd

How to protect directories with htaccess

Apache allows access to directories to be restricted unless overridden by a valid user name and password. Here you will see how to set it up in your config file, how to create the .htaccess file, and how to generate the password file for it. Denying access in httpd.conf The first step is to deny [...]

How to configure IP-based Virtual Host in APache

As the term IP-based indicates, the server must have a different IP address for each IP-based virtual host. This can be achieved by the machine having several physical network connections, or by use of virtual interfaces which are supported by most modern operating systems (see system documentation for details, these are frequently called “ip aliases”, [...]

How to Force history not to remember a particular command using HISTCONTROL

It is possible to instruct history to ignore a command when executing a command. # export HISTCONTROL=ignorespace # ls -ltr # pwd # service httpd stop [Note that there is a space at the beginning of service] # history | tail -3 67 ls -ltr 68 pwd 69 history | tail -3

How to Generate a self-signed certificate for Https

Using OpenSSL we will generate a self-signed certificate. If you are using this on a production server you are probably likely to want a key from Trusted Certificate Authority, but if you are just using this on a personal site or for testing purposes a self-signed certificate is fine. To create the key you will [...]

How To Grant/Deny Access to Particular Web Files Using Apache

When browsing web files and directory, most bots, without consideration to .htaccess restrictions, have the capability to crawl and sniff files and folders located under your web root folder, even if these files and folders were not visually displayed from your web pages. Take for an example, you displayed a file under http://domain.com/folder1/folder2/folder3/page.html Most bots [...]

How to install Zend Optimizer

The Zend Optimizer is a free runtime application that enables PHP to run the files encoded by the Zend Guard. This can be freely used by anyone looking to run encoded applications. Please download and follow the installation instructions included in the distributions. The simplest way to get a PHP runtime that includes Zend Optimizer [...]

How to install and configure webalizer in multiple domain on Centos 4.6

Webalizer is a fast, free web server log file analysis program. It produces highly detailed, easily configurable usage reports in HTML format, for viewing with a standard web browser. It was written to solve several problems with currently available analysis packages. A vast majority of them were written in Perl or some other scripting language, [...]

How to Monitor Processes Using the PS Command

The ps command will display the running processes on a GNU/Linux system. As with many command-line applications there are many options and switches. I’m just going to touch on the few more common but you can use the man pscommand to find out other things you can do with ps. ps by itself will display [...]

How to Install and Configure the eAccelerator PHP cache on Apache

If you are looking for a way to speed up your PHP pages on Apache, this is the software you want to install. Huge performance gains can be had when using this software to precompile and cache your PHP pages, and it is very simple to install.

A Quick Guide To Install SUBVERSION

Subversion depends on a number of third party tools and libraries.Some of them are only required to run a Subversion server; others are necessary just for a Subversion client. This section explains what other tools and libraries will be required so that Subversion can be built with the set of features you want

How to Configure your server to permit SSI – Apache

This tells Apache that you want to permit files to be parsed for SSI directives. Note that most configurations contain multiple Options directives that can override each other. You will probably need to apply the Options to the specific directory where you want SSI enabled in order to assure that it gets evaluated last.

How to define a Secure Virtual Host – Apache

Setting up virtual hosts is fairly straightforward. I will go through the basics of setting up a secure virtual host. In these examples, I use the .crt and .key file extensions. That is my personal way of avoiding confusion with the various files. With Apache, you can use any extension you choose – or no extension at all. All [...]

How to reset your Apache log files

Sooner or later, you’ll want to reset your log files (access_log and error_log) because they are too big, or full of old information you don’t need. access.log typically grows by 1Mb for each 10,000 requests. Most people’s first attempt at replacing the logfile is to just move the logfile or remove the logfile. This doesn’t [...]

How to redirect an entire server or directory to a single URL

There are two chief ways to redirect all requests for an entire server to a single location: one which requires the use of mod_rewrite, and another which uses a CGI script. First: if all you need to do is migrate a server from one name to another, simply use the Redirect directive, as supplied by [...]