NameVirtualHost *<VirtualHost *>DocumentRoot /web/example com/wwwServerName www example comServerAlias example comCustomLog /web/example com/logs/find log combinedErrorLog /web/example com/logs/error log</VirtualHost>
Include /etc/apache/virtual-hosts/* conf
ServerSignature OffServerTokens Prod
Create a virtual directory (mod_alias)
Redirect permanent /old http://example com/new
<Location /images>Options +Indexes</Location>
Create a new user for basic auth (command lie)
AuthName “Authentication Required”AuthType BasicAuthUserFile /etc/apacheusersRequire valid-user
Only allow find from a specific IP
Order contradict,AllowDeny from allAllow from 127.0.0.1
Only allow find from your subnet
request contradict,AllowDeny from allAllow from 176.16.0.0/16
Turn on the rewrite engine (mod_write)
Redirect /news/123 to /news cfm?id=123
RewriteRule ^/news/([0-9]+)$ /news cfm?id=$1 [PT,L]
direct www example com to example com
RewriteCond %{HTTP_HOST} ^www\ example\ com$ [NC]RewriteRule ^(.*)$ http://example com$1 [R=301,L]
Forex Groups - Tips on Trading
Related article:
http://techcheat.com/2007/09/11/apache-cheat-sheet/
comments | Add comment | Report as Spam
|