Tag: web server

Red Hat / CentOS: Chroot Apache 2 Web Server

A chroot on Red Hat / CentOS / Fedora Linux operating changes the apparent disk root directory for the Apache process and its children. Once this is done attacker or other php / perl / python scripts cannot access or name files outside that directory. This is called a “chroot […]

Apache FastCGI / mod_fastcgi PHP Script

Use this script to run Apache 2.x with mod_fastcgi. Install Apache 22 from FreeBSD port or using source code. The script is tested under FreeBSD and Debian / RHEL / CentOS Linux. How do I use script? Download the script Put in cgi-bin directory as php.cgi Set permission Configure httpd.conf […]

Password Protect a Directory

1. Create a .htaccess file AuthName “Secure Area” AuthType Basic AuthUserFile /path/to/your/directory/.htpasswd require valid-user 2. Create a .htpasswd file under the account using this command htpasswd -c .htpasswd your-user-name and give the password 3.  If you have more than one user, then htpasswd .htpasswd another-user-name 4. Make sure the permission […]

Red Hat / CentOS Install nginx PHP5 FastCGI Webserver

How do I install and configure a ngnix FastCGI php5 HTTP / web server under Red Hat / RHEL / Fedora / CentOS Linux? Nginx (engine x) is an HTTP(S) server, reverse proxy and IMAP/POP3 proxy server written by Igor Sysoev. It is known for its high performance, stability, rich […]

Using Nginx as reverse proxy

It’s common knowledge that when you’re serving a web application you shouldn’t use a standard Apache install to serve static assets, as it comes with too much overhead. I won’t go into the details of why here, as it’s been covered by many other people better qualified than I. What […]

Shell Script To Clean Lighttpd Web Server Cache

This shell script will clean lighttpd web server cache. You need to run this script via a cron job. Download install script at /etc/cron.daily directory. #!/bin/bash # Shell script to clean web server cache stored at /var/www/cache/ directory. # ————————————————————————- # Copyright (c) 2007 nixCraft project <http://cyberciti.biz/fb/> # This script […]

[HOW-TO] Config Nginx to work with Drupal 6

Yesterday, I’ve tried to setup Nginx as a Reverse Proxy for Apache – Worker MPM base webserver. I found that it doesn’t help my server performance as I expected. So, I decided to try to set up Nginx to be a Webserver to see if Nginx can give me a […]

Apache2 mod_fastcgi: Connect to External PHP via UNIX Socket or TCP/IP Port

Now, mod_fastcgi is configured and running. FastCGI supports connection via UNIX sockets or TCP/IP networking. This is useful to spread load among various backends. For example, php will be severed from 192.168.1.10 and python / ruby on rails will be severed from 192.168.1.11. This is only possible with mod_fastcgi. Required […]