Pick a Free OS

User login

Navigation

Web server tutorial - Part 2

Control access to UserDir directories. The following is an example for a site

where these directories are restricted to read-only.


AllowOverride FileInfo AuthConfig Limit

Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec


Order allow,deny

Allow from all



Order deny,allow

Deny from all


DirectoryIndex: Name of the file or files to use as a pre-written HTML directory

index. Separate multiple entries with spaces.

DirectoryIndex index.html index.htm index.shtml index.cgi

AccessFileName: The name of the file to look for in each directory for access

control information.

AccessFileName .htaccess

The following lines prevent .htaccess files from being viewed by Web clients.

Since .htaccess files often contain authorization information, access is disallowed

for security reasons. Comment these lines out if you want Web visitors to see

the contents of .htaccess files. If you change the AccessFileName directive

above, be sure to make the corresponding changes here.

Also, folks tend to use names such as .htpasswd for password files, so this

will protect those as well.


Order allow,deny

Deny from all

CacheNegotiatedDocs: By default, Apache sends "Pragma: no-cache"

with each document that was negotiated on the basis of content. This asks proxy

servers not to cache the document. Uncommenting the following line disables

this behavior, and proxies will be allowed to cache the documents.

#CacheNegotiatedDocs

UseCanonicalName: (new for 1.3) With this setting turned on, whenever Apache

needs to construct a self-referencing URL (a URL that refers back to the server

the response is coming from) it will use ServerName and Port to form a "canonical"

name. With this setting off, Apache will use the hostname:port that the client

supplied, when possible. This also affects SERVER_NAME and SERVER_PORT in CGI

scripts.

UseCanonicalName On