background preloader

Apache

Facebook Twitter

What is .htaccess and its functions | Codelator. A .htaccess (hypertext access) is a file on the web server that allows to create a global configuration for web server. They are generally placed inside the root folder and has various functions such as redirecting url, adding prefix to a url, prevent hotlinking, restricting access, redirecting to error pages, compressing a website to make it more faster, cache control etc. A .htaccess file can be created on your computer or on the server. The main function of .htaccess is to give instructions to the server. The permission parameters set for a .htaccess file is 644. You can create .htaccess file by creating new file and naming it as .htaccess Adding www. to your existing domain Nowadays, it is not necessary to add www. to any domain but its a good practice to add it through .htaccess. Code Redirect to Error Pages An error page is shown on a website when a webpage is not found or if there is any other errors such as Forbidden(403), Bad Gateway(502), Bad Request(400) etc.

Prevent Hotlinking. Apache2 - How do I select which Apache MPM to use. Core. AcceptFilter Directive This directive enables operating system specific optimizations for a listening socket by the Protocol type. The basic premise is for the kernel to not send a socket to the server process until either data is received or an entire HTTP Request is buffered. Only FreeBSD's Accept Filters and Linux's more primitive TCP_DEFER_ACCEPT are currently supported. The default values on FreeBSD are: AcceptFilter http httpready AcceptFilter https dataready The httpready accept filter buffers entire HTTP requests at the kernel level.

The default values on Linux are: AcceptFilter http data AcceptFilter https data Linux's TCP_DEFER_ACCEPT does not support buffering http requests. Using none for an argument will disable any accept filters for that protocol. See also Protocol AcceptPathInfo Directive For example, assume the location /test/ points to a directory that contains only the single file here.html. The three possible arguments for the AcceptPathInfo directive are: Off On Default Note. How To Set Up Apache2 With mod_fcgid And PHP5 On Ubuntu 10.04. Version 1.0 Author: Falko Timme <ft [at] falkotimme [dot] com> Follow me on Twitter Last edited 08/18/2010 This tutorial describes how you can install Apache2 with mod_fcgid and PHP5 on Ubuntu 10.04. mod_fcgid is a compatible alternative to the older mod_fastcgi. It lets you execute PHP scripts with the permissions of their owners instead of the Apache user.

I do not issue any guarantee that this will work for you! 1 Preliminary Note I'm using an Ubuntu 10.04 server in this tutorial with the hostname server1.example.com and the IP address 192.168.0.100. I will create two Apache vhosts in this tutorial, www.example1.com and www.example2.com, to demonstrate the usage of mod_fcgid. Make sure you're logged in as root: sudo su /bin/sh is a symlink to /bin/dash, however we need /bin/bash, not /bin/dash. Dpkg-reconfigure dash Install dash as /bin/sh? In addition to that, we must disable AppArmor: /etc/init.d/apparmor stop update-rc.d -f apparmor remove aptitude remove apparmor apparmor-utils.

P3P

Htaccess. Cookies. Mod_rewrite.