<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>xiaoTao (xiaoTao)</title>
    <link>https://ruby-china.org/xiaoTao</link>
    <description/>
    <language>en-us</language>
    <item>
      <title>这张图片是用什么软件画的</title>
      <description>&lt;p&gt;如题，麻烦知道的朋友说一下软件的名称啊
&lt;img src="https://l.ruby-china.com/photo/2016/5b831eab9bd21c79b8f07e2660925596.png" title="" alt=""&gt;&lt;/p&gt;</description>
      <author>xiaoTao</author>
      <pubDate>Thu, 21 Jan 2016 11:19:34 +0800</pubDate>
      <link>https://ruby-china.org/topics/28803</link>
      <guid>https://ruby-china.org/topics/28803</guid>
    </item>
    <item>
      <title>请教下面这个 SQL 该怎么写？</title>
      <description>&lt;p&gt;现有如下两张表：A 和 B，B 表中记录了 A 的主键 ID，现需要统计 A 中的数据，其中一个字段是 A 表记录在 B 表中的记录总数，如何通过一条 SQL 进行完成。&lt;/p&gt;

&lt;p&gt;PS：数据库位 Mysql&lt;/p&gt;</description>
      <author>xiaoTao</author>
      <pubDate>Mon, 03 Mar 2014 14:35:25 +0800</pubDate>
      <link>https://ruby-china.org/topics/17627</link>
      <guid>https://ruby-china.org/topics/17627</guid>
    </item>
    <item>
      <title>大家都过来帮我出出主意吧</title>
      <description>&lt;p&gt;快过年了，项目也接近尾声，领导们为了给客户方领导汇报，打算开一次隆重的项目上线会议，由于出席的均是公司的大领导，包括总裁和副总裁以及各种总等，因此这个会议需要够炫和有新意。领导们的意思是做一带有操作性的动画，如展示流程：
  呼叫中心给快递员派单子到指定客户取件，然后在地图上显示当前快递员，并进行接单上门动作。&lt;/p&gt;

&lt;p&gt;展现方式不限，可以是 PPT 或是 HTML5 动画。&lt;/p&gt;

&lt;p&gt;大家都给我点意见吧，小妹在这儿谢过了额！&lt;/p&gt;</description>
      <author>xiaoTao</author>
      <pubDate>Fri, 10 Jan 2014 19:36:30 +0800</pubDate>
      <link>https://ruby-china.org/topics/16724</link>
      <guid>https://ruby-china.org/topics/16724</guid>
    </item>
    <item>
      <title>Rails 项目部署问题</title>
      <description>&lt;p&gt;环境：Centos6.3 + Apache2 + Passenger
我创建了一个 web 用户，并赋予 sudo 权限后，搭建好环境都很顺利，第一个 rails 应用也很顺利的跑起来了，但部署的时候遇到了麻烦：
我的 httpd 的配置文件：&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# This is the main Apache server configuration file.  It contains the&lt;/span&gt;
&lt;span class="c"&gt;# configuration directives that give the server its instructions.&lt;/span&gt;
&lt;span class="c"&gt;# See &amp;lt;URL:http://httpd.apache.org/docs/2.2/&amp;gt; for detailed information.&lt;/span&gt;
&lt;span class="c"&gt;# In particular, see&lt;/span&gt;
&lt;span class="c"&gt;# &amp;lt;URL:http://httpd.apache.org/docs/2.2/mod/directives.html&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;# for a discussion of each configuration directive.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Do NOT simply read the instructions in here without understanding&lt;/span&gt;
&lt;span class="c"&gt;# what they do.  They're here only as hints or reminders.  If you are unsure&lt;/span&gt;
&lt;span class="c"&gt;# consult the online docs. You have been warned.  &lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# The configuration directives are grouped into three basic sections:&lt;/span&gt;
&lt;span class="c"&gt;#  1. Directives that control the operation of the Apache server process as a&lt;/span&gt;
&lt;span class="c"&gt;#     whole (the 'global environment').&lt;/span&gt;
&lt;span class="c"&gt;#  2. Directives that define the parameters of the 'main' or 'default' server,&lt;/span&gt;
&lt;span class="c"&gt;#     which responds to requests that aren't handled by a virtual host.&lt;/span&gt;
&lt;span class="c"&gt;#     These directives also provide default values for the settings&lt;/span&gt;
&lt;span class="c"&gt;#     of all virtual hosts.&lt;/span&gt;
&lt;span class="c"&gt;#  3. Settings for virtual hosts, which allow Web requests to be sent to&lt;/span&gt;
&lt;span class="c"&gt;#     different IP addresses or hostnames and have them handled by the&lt;/span&gt;
&lt;span class="c"&gt;#     same Apache server process.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Configuration and logfile names: If the filenames you specify for many&lt;/span&gt;
&lt;span class="c"&gt;# of the server's control files begin with "/" (or "drive:/" for Win32), the&lt;/span&gt;
&lt;span class="c"&gt;# server will use that explicit path.  If the filenames do *not* begin&lt;/span&gt;
&lt;span class="c"&gt;# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"&lt;/span&gt;
&lt;span class="c"&gt;# with ServerRoot set to "/etc/httpd" will be interpreted by the&lt;/span&gt;
&lt;span class="c"&gt;# server as "/etc/httpd/logs/foo.log".&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;

&lt;span class="c"&gt;### Section 1: Global Environment&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# The directives in this section affect the overall operation of Apache,&lt;/span&gt;
&lt;span class="c"&gt;# such as the number of concurrent requests it can handle or where it&lt;/span&gt;
&lt;span class="c"&gt;# can find its configuration files.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Don't give away too much information about all the subcomponents&lt;/span&gt;
&lt;span class="c"&gt;# we are running.  Comment out this line if you don't mind remote sites&lt;/span&gt;
&lt;span class="c"&gt;# finding out what major optional modules you are running&lt;/span&gt;
ServerTokens OS

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# ServerRoot: The top of the directory tree under which the server's&lt;/span&gt;
&lt;span class="c"&gt;# configuration, error, and log files are kept.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# NOTE!  If you intend to place this on an NFS (or otherwise network)&lt;/span&gt;
&lt;span class="c"&gt;# mounted filesystem then please read the LockFile documentation&lt;/span&gt;
&lt;span class="c"&gt;# (available at &amp;lt;URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile&amp;gt;);&lt;/span&gt;
&lt;span class="c"&gt;# you will save yourself a lot of trouble.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Do NOT add a slash at the end of the directory path.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
ServerRoot &lt;span class="s2"&gt;"/etc/httpd"&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# PidFile: The file in which the server should record its process&lt;/span&gt;
&lt;span class="c"&gt;# identification number when it starts.  Note the PIDFILE variable in&lt;/span&gt;
&lt;span class="c"&gt;# /etc/sysconfig/httpd must be set appropriately if this location is&lt;/span&gt;
&lt;span class="c"&gt;# changed.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
PidFile run/httpd.pid

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Timeout: The number of seconds before receives and sends time out.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
Timeout 60

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# KeepAlive: Whether or not to allow persistent connections (more than&lt;/span&gt;
&lt;span class="c"&gt;# one request per connection). Set to "Off" to deactivate.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
KeepAlive Off

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# MaxKeepAliveRequests: The maximum number of requests to allow&lt;/span&gt;
&lt;span class="c"&gt;# during a persistent connection. Set to 0 to allow an unlimited amount.&lt;/span&gt;
&lt;span class="c"&gt;# We recommend you leave this number high, for maximum performance.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
MaxKeepAliveRequests 100

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# KeepAliveTimeout: Number of seconds to wait for the next request from the&lt;/span&gt;
&lt;span class="c"&gt;# same client on the same connection.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
KeepAliveTimeout 15

&lt;span class="c"&gt;##&lt;/span&gt;
&lt;span class="c"&gt;## Server-Pool Size Regulation (MPM specific)&lt;/span&gt;
&lt;span class="c"&gt;## &lt;/span&gt;

&lt;span class="c"&gt;# prefork MPM&lt;/span&gt;
&lt;span class="c"&gt;# StartServers: number of server processes to start&lt;/span&gt;
&lt;span class="c"&gt;# MinSpareServers: minimum number of server processes which are kept spare&lt;/span&gt;
&lt;span class="c"&gt;# MaxSpareServers: maximum number of server processes which are kept spare&lt;/span&gt;
&lt;span class="c"&gt;# ServerLimit: maximum value for MaxClients for the lifetime of the server&lt;/span&gt;
&lt;span class="c"&gt;# MaxClients: maximum number of server processes allowed to start&lt;/span&gt;
&lt;span class="c"&gt;# MaxRequestsPerChild: maximum number of requests a server process serves&lt;/span&gt;
&amp;lt;IfModule prefork.c&amp;gt;
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
&amp;lt;/IfModule&amp;gt;

&lt;span class="c"&gt;# worker MPM&lt;/span&gt;
&lt;span class="c"&gt;# StartServers: initial number of server processes to start&lt;/span&gt;
&lt;span class="c"&gt;# MaxClients: maximum number of simultaneous client connections&lt;/span&gt;
&lt;span class="c"&gt;# MinSpareThreads: minimum number of worker threads which are kept spare&lt;/span&gt;
&lt;span class="c"&gt;# MaxSpareThreads: maximum number of worker threads which are kept spare&lt;/span&gt;
&lt;span class="c"&gt;# ThreadsPerChild: constant number of worker threads in each server process&lt;/span&gt;
&lt;span class="c"&gt;# MaxRequestsPerChild: maximum number of requests a server process serves&lt;/span&gt;
&amp;lt;IfModule worker.c&amp;gt;
StartServers         4
MaxClients         300
MinSpareThreads     25
MaxSpareThreads     75 
ThreadsPerChild     25
MaxRequestsPerChild  0
&amp;lt;/IfModule&amp;gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Listen: Allows you to bind Apache to specific IP addresses and/or&lt;/span&gt;
&lt;span class="c"&gt;# ports, in addition to the default. See also the &amp;lt;VirtualHost&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;# directive.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Change this to Listen on specific IP addresses as shown below to &lt;/span&gt;
&lt;span class="c"&gt;# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#Listen 12.34.56.78:80&lt;/span&gt;
Listen 80

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Dynamic Shared Object (DSO) Support&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# To be able to use the functionality of a module which was built as a DSO you&lt;/span&gt;
&lt;span class="c"&gt;# have to place corresponding `LoadModule' lines at this location so the&lt;/span&gt;
&lt;span class="c"&gt;# directives contained in it are actually available _before_ they are used.&lt;/span&gt;
&lt;span class="c"&gt;# Statically compiled modules (those listed by `httpd -l') do not need&lt;/span&gt;
&lt;span class="c"&gt;# to be loaded here.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Example:&lt;/span&gt;
&lt;span class="c"&gt;# LoadModule foo_module modules/mod_foo.so&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule substitute_module modules/mod_substitute.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so
LoadModule passenger_module /home/web/.rvm/gems/ruby-1.9.2-p320/gems/passenger-4.0.14/buildout/apache2/mod_passenger.so
PassengerRoot /home/web/.rvm/gems/ruby-1.9.2-p320/gems/passenger-4.0.14
PassengerDefaultRuby /home/web/.rvm/wrappers/ruby-1.9.2-p320/ruby

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# The following modules are not loaded by default:&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#LoadModule asis_module modules/mod_asis.so&lt;/span&gt;
&lt;span class="c"&gt;#LoadModule authn_dbd_module modules/mod_authn_dbd.so&lt;/span&gt;
&lt;span class="c"&gt;#LoadModule cern_meta_module modules/mod_cern_meta.so&lt;/span&gt;
&lt;span class="c"&gt;#LoadModule cgid_module modules/mod_cgid.so&lt;/span&gt;
&lt;span class="c"&gt;#LoadModule dbd_module modules/mod_dbd.so&lt;/span&gt;
&lt;span class="c"&gt;#LoadModule dumpio_module modules/mod_dumpio.so&lt;/span&gt;
&lt;span class="c"&gt;#LoadModule filter_module modules/mod_filter.so&lt;/span&gt;
&lt;span class="c"&gt;#LoadModule ident_module modules/mod_ident.so&lt;/span&gt;
&lt;span class="c"&gt;#LoadModule log_forensic_module modules/mod_log_forensic.so&lt;/span&gt;
&lt;span class="c"&gt;#LoadModule unique_id_module modules/mod_unique_id.so&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Load config files from the config directory "/etc/httpd/conf.d".&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
Include conf.d/&lt;span class="k"&gt;*&lt;/span&gt;.conf

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# ExtendedStatus controls whether Apache will generate "full" status&lt;/span&gt;
&lt;span class="c"&gt;# information (ExtendedStatus On) or just basic information (ExtendedStatus&lt;/span&gt;
&lt;span class="c"&gt;# Off) when the "server-status" handler is called. The default is Off.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#ExtendedStatus On&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# If you wish httpd to run as a different user or group, you must run&lt;/span&gt;
&lt;span class="c"&gt;# httpd as root initially and it will switch.  &lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# User/Group: The name (or #number) of the user/group to run httpd as.&lt;/span&gt;
&lt;span class="c"&gt;#  . On SCO (ODT 3) use "User nouser" and "Group nogroup".&lt;/span&gt;
&lt;span class="c"&gt;#  . On HPUX you may not be able to use shared memory as nobody, and the&lt;/span&gt;
&lt;span class="c"&gt;#    suggested workaround is to create a user www and use that user.&lt;/span&gt;
&lt;span class="c"&gt;#  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)&lt;/span&gt;
&lt;span class="c"&gt;#  when the value of (unsigned)Group is above 60000; &lt;/span&gt;
&lt;span class="c"&gt;#  don't use Group #-1 on these systems!&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
User apache
Group apache

&lt;span class="c"&gt;### Section 2: 'Main' server configuration&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# The directives in this section set up the values used by the 'main'&lt;/span&gt;
&lt;span class="c"&gt;# server, which responds to any requests that aren't handled by a&lt;/span&gt;
&lt;span class="c"&gt;# &amp;lt;VirtualHost&amp;gt; definition.  These values also provide defaults for&lt;/span&gt;
&lt;span class="c"&gt;# any &amp;lt;VirtualHost&amp;gt; containers you may define later in the file.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# All of these directives may appear inside &amp;lt;VirtualHost&amp;gt; containers,&lt;/span&gt;
&lt;span class="c"&gt;# in which case these default settings will be overridden for the&lt;/span&gt;
&lt;span class="c"&gt;# virtual host being defined.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# ServerAdmin: Your address, where problems with the server should be&lt;/span&gt;
&lt;span class="c"&gt;# e-mailed.  This address appears on some server-generated pages, such&lt;/span&gt;
&lt;span class="c"&gt;# as error documents.  e.g. admin@your-domain.com&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
ServerAdmin root@localhost

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# ServerName gives the name and port that the server uses to identify itself.&lt;/span&gt;
&lt;span class="c"&gt;# This can often be determined automatically, but we recommend you specify&lt;/span&gt;
&lt;span class="c"&gt;# it explicitly to prevent problems during startup.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# If this is not set to valid DNS name for your host, server-generated&lt;/span&gt;
&lt;span class="c"&gt;# redirections will not work.  See also the UseCanonicalName directive.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# If your host doesn't have a registered DNS name, enter its IP address here.&lt;/span&gt;
&lt;span class="c"&gt;# You will have to access it by its address anyway, and this will make &lt;/span&gt;
&lt;span class="c"&gt;# redirections work in a sensible way.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#ServerName www.example.com:80&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# UseCanonicalName: Determines how Apache constructs self-referencing &lt;/span&gt;
&lt;span class="c"&gt;# URLs and the SERVER_NAME and SERVER_PORT variables.&lt;/span&gt;
&lt;span class="c"&gt;# When set "Off", Apache will use the Hostname and Port supplied&lt;/span&gt;
&lt;span class="c"&gt;# by the client.  When set "On", Apache will use the value of the&lt;/span&gt;
&lt;span class="c"&gt;# ServerName directive.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
UseCanonicalName Off

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# DocumentRoot: The directory out of which you will serve your&lt;/span&gt;
&lt;span class="c"&gt;# documents. By default, all requests are taken from this directory, but&lt;/span&gt;
&lt;span class="c"&gt;# symbolic links and aliases may be used to point to other locations.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
DocumentRoot &lt;span class="s2"&gt;"/var/www/html"&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Each directory to which Apache has access can be configured with respect&lt;/span&gt;
&lt;span class="c"&gt;# to which services and features are allowed and/or disabled in that&lt;/span&gt;
&lt;span class="c"&gt;# directory (and its subdirectories). &lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# First, we configure the "default" to be a very restrictive set of &lt;/span&gt;
&lt;span class="c"&gt;# features.  &lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#&amp;lt;Directory /&amp;gt;&lt;/span&gt;
   &lt;span class="c"&gt;# Options FollowSymLinks&lt;/span&gt;
   &lt;span class="c"&gt;# AllowOverride None&lt;/span&gt;
   &lt;span class="c"&gt;# Allow from all&lt;/span&gt;
   &lt;span class="c"&gt;#Options FollowSymLinks&lt;/span&gt;
   &lt;span class="c"&gt;#AllowOverride None&lt;/span&gt;
   &lt;span class="c"&gt;#Order deny,allow&lt;/span&gt;
   &lt;span class="c"&gt;#allow from all&lt;/span&gt;
&lt;span class="c"&gt;#&amp;lt;/Directory&amp;gt;&lt;/span&gt;
&amp;lt;Directory /&amp;gt;
    &lt;span class="c"&gt;#Options FollowSymLinks&lt;/span&gt;
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order deny,allow
    Allow from all
&amp;lt;/Directory&amp;gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Note that from this point forward you must specifically allow&lt;/span&gt;
&lt;span class="c"&gt;# particular features to be enabled - so if something's not working as&lt;/span&gt;
&lt;span class="c"&gt;# you might expect, make sure that you have specifically enabled it&lt;/span&gt;
&lt;span class="c"&gt;# below.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# This should be changed to whatever you set DocumentRoot to.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&amp;lt;Directory &lt;span class="s2"&gt;"/var/www/html"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Possible values for the Options directive are "None", "All",&lt;/span&gt;
&lt;span class="c"&gt;# or any combination of:&lt;/span&gt;
&lt;span class="c"&gt;#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Note that "MultiViews" must be named *explicitly* --- "Options All"&lt;/span&gt;
&lt;span class="c"&gt;# doesn't give it to you.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# The Options directive is both complicated and important.  Please see&lt;/span&gt;
&lt;span class="c"&gt;# http://httpd.apache.org/docs/2.2/mod/core.html#options&lt;/span&gt;
&lt;span class="c"&gt;# for more information.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
    Options Indexes FollowSymLinks

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# AllowOverride controls what directives may be placed in .htaccess files.&lt;/span&gt;
&lt;span class="c"&gt;# It can be "All", "None", or any combination of the keywords:&lt;/span&gt;
&lt;span class="c"&gt;#   Options FileInfo AuthConfig Limit&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
    AllowOverride None

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Controls who can get stuff from this server.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
    Order allow,deny
    Allow from all

&amp;lt;/Directory&amp;gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# UserDir: The name of the directory that is appended onto a user's home&lt;/span&gt;
&lt;span class="c"&gt;# directory if a ~user request is received.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# The path to the end user account 'public_html' directory must be&lt;/span&gt;
&lt;span class="c"&gt;# accessible to the webserver userid.  This usually means that ~userid&lt;/span&gt;
&lt;span class="c"&gt;# must have permissions of 711, ~userid/public_html must have permissions&lt;/span&gt;
&lt;span class="c"&gt;# of 755, and documents contained therein must be world-readable.&lt;/span&gt;
&lt;span class="c"&gt;# Otherwise, the client will only receive a "403 Forbidden" message.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&amp;lt;IfModule mod_userdir.c&amp;gt;
    &lt;span class="c"&gt;#&lt;/span&gt;
    &lt;span class="c"&gt;# UserDir is disabled by default since it can confirm the presence&lt;/span&gt;
    &lt;span class="c"&gt;# of a username on the system (depending on home directory&lt;/span&gt;
    &lt;span class="c"&gt;# permissions).&lt;/span&gt;
    &lt;span class="c"&gt;#&lt;/span&gt;
    UserDir disabled

    &lt;span class="c"&gt;#&lt;/span&gt;
    &lt;span class="c"&gt;# To enable requests to /~user/ to serve the user's public_html&lt;/span&gt;
    &lt;span class="c"&gt;# directory, remove the "UserDir disabled" line above, and uncomment&lt;/span&gt;
    &lt;span class="c"&gt;# the following line instead:&lt;/span&gt;
    &lt;span class="c"&gt;# &lt;/span&gt;
    &lt;span class="c"&gt;#UserDir public_html&lt;/span&gt;

&amp;lt;/IfModule&amp;gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Control access to UserDir directories.  The following is an example&lt;/span&gt;
&lt;span class="c"&gt;# for a site where these directories are restricted to read-only.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#&amp;lt;Directory /home/*/public_html&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;#    AllowOverride FileInfo AuthConfig Limit&lt;/span&gt;
&lt;span class="c"&gt;#    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec&lt;/span&gt;
&lt;span class="c"&gt;#    &amp;lt;Limit GET POST OPTIONS&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;#        Order allow,deny&lt;/span&gt;
&lt;span class="c"&gt;#        Allow from all&lt;/span&gt;
&lt;span class="c"&gt;#    &amp;lt;/Limit&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;#    &amp;lt;LimitExcept GET POST OPTIONS&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;#        Order deny,allow&lt;/span&gt;
&lt;span class="c"&gt;#        Deny from all&lt;/span&gt;
&lt;span class="c"&gt;#    &amp;lt;/LimitExcept&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;#&amp;lt;/Directory&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# DirectoryIndex: sets the file that Apache will serve if a directory&lt;/span&gt;
&lt;span class="c"&gt;# is requested.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# The index.html.var file (a type-map) is used to deliver content-&lt;/span&gt;
&lt;span class="c"&gt;# negotiated documents.  The MultiViews Option can be used for the &lt;/span&gt;
&lt;span class="c"&gt;# same purpose, but it is much slower.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
DirectoryIndex index.html index.html.var

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# AccessFileName: The name of the file to look for in each directory&lt;/span&gt;
&lt;span class="c"&gt;# for additional configuration directives.  See also the AllowOverride&lt;/span&gt;
&lt;span class="c"&gt;# directive.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
AccessFileName .htaccess

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# The following lines prevent .htaccess and .htpasswd files from being &lt;/span&gt;
&lt;span class="c"&gt;# viewed by Web clients. &lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&amp;lt;Files ~ &lt;span class="s2"&gt;"^&lt;/span&gt;&lt;span class="se"&gt;\.&lt;/span&gt;&lt;span class="s2"&gt;ht"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    Order allow,deny
    Deny from all
    Satisfy All
&amp;lt;/Files&amp;gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# TypesConfig describes where the mime.types file (or equivalent) is&lt;/span&gt;
&lt;span class="c"&gt;# to be found.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
TypesConfig /etc/mime.types

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# DefaultType is the default MIME type the server will use for a document&lt;/span&gt;
&lt;span class="c"&gt;# if it cannot otherwise determine one, such as from filename extensions.&lt;/span&gt;
&lt;span class="c"&gt;# If your server contains mostly text or HTML documents, "text/plain" is&lt;/span&gt;
&lt;span class="c"&gt;# a good value.  If most of your content is binary, such as applications&lt;/span&gt;
&lt;span class="c"&gt;# or images, you may want to use "application/octet-stream" instead to&lt;/span&gt;
&lt;span class="c"&gt;# keep browsers from trying to display binary files as though they are&lt;/span&gt;
&lt;span class="c"&gt;# text.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
DefaultType text/plain

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# The mod_mime_magic module allows the server to use various hints from the&lt;/span&gt;
&lt;span class="c"&gt;# contents of the file itself to determine its type.  The MIMEMagicFile&lt;/span&gt;
&lt;span class="c"&gt;# directive tells the module where the hint definitions are located.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&amp;lt;IfModule mod_mime_magic.c&amp;gt;
&lt;span class="c"&gt;#   MIMEMagicFile /usr/share/magic.mime&lt;/span&gt;
    MIMEMagicFile conf/magic
&amp;lt;/IfModule&amp;gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# HostnameLookups: Log the names of clients or just their IP addresses&lt;/span&gt;
&lt;span class="c"&gt;# e.g., www.apache.org (on) or 204.62.129.132 (off).&lt;/span&gt;
&lt;span class="c"&gt;# The default is off because it'd be overall better for the net if people&lt;/span&gt;
&lt;span class="c"&gt;# had to knowingly turn this feature on, since enabling it means that&lt;/span&gt;
&lt;span class="c"&gt;# each client request will result in AT LEAST one lookup request to the&lt;/span&gt;
&lt;span class="c"&gt;# nameserver.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
HostnameLookups Off

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# EnableMMAP: Control whether memory-mapping is used to deliver&lt;/span&gt;
&lt;span class="c"&gt;# files (assuming that the underlying OS supports it).&lt;/span&gt;
&lt;span class="c"&gt;# The default is on; turn this off if you serve from NFS-mounted &lt;/span&gt;
&lt;span class="c"&gt;# filesystems.  On some systems, turning it off (regardless of&lt;/span&gt;
&lt;span class="c"&gt;# filesystem) can improve performance; for details, please see&lt;/span&gt;
&lt;span class="c"&gt;# http://httpd.apache.org/docs/2.2/mod/core.html#enablemmap&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#EnableMMAP off&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# EnableSendfile: Control whether the sendfile kernel support is &lt;/span&gt;
&lt;span class="c"&gt;# used to deliver files (assuming that the OS supports it). &lt;/span&gt;
&lt;span class="c"&gt;# The default is on; turn this off if you serve from NFS-mounted &lt;/span&gt;
&lt;span class="c"&gt;# filesystems.  Please see&lt;/span&gt;
&lt;span class="c"&gt;# http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#EnableSendfile off&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# ErrorLog: The location of the error log file.&lt;/span&gt;
&lt;span class="c"&gt;# If you do not specify an ErrorLog directive within a &amp;lt;VirtualHost&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;# container, error messages relating to that virtual host will be&lt;/span&gt;
&lt;span class="c"&gt;# logged here.  If you *do* define an error logfile for a &amp;lt;VirtualHost&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;# container, that host's errors will be logged there and not here.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
ErrorLog logs/error_log

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# LogLevel: Control the number of messages logged to the error_log.&lt;/span&gt;
&lt;span class="c"&gt;# Possible values include: debug, info, notice, warn, error, crit,&lt;/span&gt;
&lt;span class="c"&gt;# alert, emerg.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
LogLevel warn

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# The following directives define some format nicknames for use with&lt;/span&gt;
&lt;span class="c"&gt;# a CustomLog directive (see below).&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
LogFormat &lt;span class="s2"&gt;"%h %l %u %t &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;%r&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; %&amp;gt;s %b &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;%{Referer}i&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;%{User-Agent}i&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; combined
LogFormat &lt;span class="s2"&gt;"%h %l %u %t &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;%r&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; %&amp;gt;s %b"&lt;/span&gt; common
LogFormat &lt;span class="s2"&gt;"%{Referer}i -&amp;gt; %U"&lt;/span&gt; referer
LogFormat &lt;span class="s2"&gt;"%{User-agent}i"&lt;/span&gt; agent

&lt;span class="c"&gt;# "combinedio" includes actual counts of actual bytes received (%I) and sent (%O); this&lt;/span&gt;
&lt;span class="c"&gt;# requires the mod_logio module to be loaded.&lt;/span&gt;
&lt;span class="c"&gt;#LogFormat "%h %l %u %t \"%r\" %&amp;gt;s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# The location and format of the access logfile (Common Logfile Format).&lt;/span&gt;
&lt;span class="c"&gt;# If you do not define any access logfiles within a &amp;lt;VirtualHost&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;# container, they will be logged here.  Contrariwise, if you *do*&lt;/span&gt;
&lt;span class="c"&gt;# define per-&amp;lt;VirtualHost&amp;gt; access logfiles, transactions will be&lt;/span&gt;
&lt;span class="c"&gt;# logged therein and *not* in this file.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#CustomLog logs/access_log common&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# If you would like to have separate agent and referer logfiles, uncomment&lt;/span&gt;
&lt;span class="c"&gt;# the following directives.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#CustomLog logs/referer_log referer&lt;/span&gt;
&lt;span class="c"&gt;#CustomLog logs/agent_log agent&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# For a single logfile with access, agent, and referer information&lt;/span&gt;
&lt;span class="c"&gt;# (Combined Logfile Format), use the following directive:&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
CustomLog logs/access_log combined

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Optionally add a line containing the server version and virtual host&lt;/span&gt;
&lt;span class="c"&gt;# name to server-generated pages (internal error documents, FTP directory&lt;/span&gt;
&lt;span class="c"&gt;# listings, mod_status and mod_info output etc., but not CGI generated&lt;/span&gt;
&lt;span class="c"&gt;# documents or custom error documents).&lt;/span&gt;
&lt;span class="c"&gt;# Set to "EMail" to also include a mailto: link to the ServerAdmin.&lt;/span&gt;
&lt;span class="c"&gt;# Set to one of:  On | Off | EMail&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
ServerSignature On

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Aliases: Add here as many aliases as you need (with no limit). The format is &lt;/span&gt;
&lt;span class="c"&gt;# Alias fakename realname&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Note that if you include a trailing / on fakename then the server will&lt;/span&gt;
&lt;span class="c"&gt;# require it to be present in the URL.  So "/icons" isn't aliased in this&lt;/span&gt;
&lt;span class="c"&gt;# example, only "/icons/".  If the fakename is slash-terminated, then the &lt;/span&gt;
&lt;span class="c"&gt;# realname must also be slash terminated, and if the fakename omits the &lt;/span&gt;
&lt;span class="c"&gt;# trailing slash, the realname must also omit it.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# We include the /icons/ alias for FancyIndexed directory listings.  If you&lt;/span&gt;
&lt;span class="c"&gt;# do not use FancyIndexing, you may comment this out.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
Alias /icons/ &lt;span class="s2"&gt;"/var/www/icons/"&lt;/span&gt;

&amp;lt;Directory &lt;span class="s2"&gt;"/var/www/icons"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
&amp;lt;/Directory&amp;gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# WebDAV module configuration section.&lt;/span&gt;
&lt;span class="c"&gt;# &lt;/span&gt;
&amp;lt;IfModule mod_dav_fs.c&amp;gt;
    &lt;span class="c"&gt;# Location of the WebDAV lock database.&lt;/span&gt;
    DAVLockDB /var/lib/dav/lockdb
&amp;lt;/IfModule&amp;gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# ScriptAlias: This controls which directories contain server scripts.&lt;/span&gt;
&lt;span class="c"&gt;# ScriptAliases are essentially the same as Aliases, except that&lt;/span&gt;
&lt;span class="c"&gt;# documents in the realname directory are treated as applications and&lt;/span&gt;
&lt;span class="c"&gt;# run by the server when requested rather than as documents sent to the client.&lt;/span&gt;
&lt;span class="c"&gt;# The same rules about trailing "/" apply to ScriptAlias directives as to&lt;/span&gt;
&lt;span class="c"&gt;# Alias.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
ScriptAlias /cgi-bin/ &lt;span class="s2"&gt;"/var/www/cgi-bin/"&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased&lt;/span&gt;
&lt;span class="c"&gt;# CGI directory exists, if you have that configured.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&amp;lt;Directory &lt;span class="s2"&gt;"/var/www/cgi-bin"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
&amp;lt;/Directory&amp;gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Redirect allows you to tell clients about documents which used to exist in&lt;/span&gt;
&lt;span class="c"&gt;# your server's namespace, but do not anymore. This allows you to tell the&lt;/span&gt;
&lt;span class="c"&gt;# clients where to look for the relocated document.&lt;/span&gt;
&lt;span class="c"&gt;# Example:&lt;/span&gt;
&lt;span class="c"&gt;# Redirect permanent /foo http://www.example.com/bar&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Directives controlling the display of server-generated directory listings.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# IndexOptions: Controls the appearance of server-generated directory&lt;/span&gt;
&lt;span class="c"&gt;# listings.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
IndexOptions FancyIndexing VersionSort &lt;span class="nv"&gt;NameWidth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt; HTMLTable &lt;span class="nv"&gt;Charset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;UTF-8

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# AddIcon* directives tell the server which icon to show for different&lt;/span&gt;
&lt;span class="c"&gt;# files or filename extensions.  These are only displayed for&lt;/span&gt;
&lt;span class="c"&gt;# FancyIndexed directories.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
AddIconByEncoding &lt;span class="o"&gt;(&lt;/span&gt;CMP,/icons/compressed.gif&lt;span class="o"&gt;)&lt;/span&gt; x-compress x-gzip

AddIconByType &lt;span class="o"&gt;(&lt;/span&gt;TXT,/icons/text.gif&lt;span class="o"&gt;)&lt;/span&gt; text/&lt;span class="k"&gt;*&lt;/span&gt;
AddIconByType &lt;span class="o"&gt;(&lt;/span&gt;IMG,/icons/image2.gif&lt;span class="o"&gt;)&lt;/span&gt; image/&lt;span class="k"&gt;*&lt;/span&gt;
AddIconByType &lt;span class="o"&gt;(&lt;/span&gt;SND,/icons/sound2.gif&lt;span class="o"&gt;)&lt;/span&gt; audio/&lt;span class="k"&gt;*&lt;/span&gt;
AddIconByType &lt;span class="o"&gt;(&lt;/span&gt;VID,/icons/movie.gif&lt;span class="o"&gt;)&lt;/span&gt; video/&lt;span class="k"&gt;*&lt;/span&gt;

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# DefaultIcon is which icon to show for files which do not have an icon&lt;/span&gt;
&lt;span class="c"&gt;# explicitly set.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
DefaultIcon /icons/unknown.gif

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# AddDescription allows you to place a short description after a file in&lt;/span&gt;
&lt;span class="c"&gt;# server-generated indexes.  These are only displayed for FancyIndexed&lt;/span&gt;
&lt;span class="c"&gt;# directories.&lt;/span&gt;
&lt;span class="c"&gt;# Format: AddDescription "description" filename&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#AddDescription "GZIP compressed document" .gz&lt;/span&gt;
&lt;span class="c"&gt;#AddDescription "tar archive" .tar&lt;/span&gt;
&lt;span class="c"&gt;#AddDescription "GZIP compressed tar archive" .tgz&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# ReadmeName is the name of the README file the server will look for by&lt;/span&gt;
&lt;span class="c"&gt;# default, and append to directory listings.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# HeaderName is the name of a file which should be prepended to&lt;/span&gt;
&lt;span class="c"&gt;# directory indexes. &lt;/span&gt;
ReadmeName README.html
HeaderName HEADER.html

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# IndexIgnore is a set of filenames which directory indexing should ignore&lt;/span&gt;
&lt;span class="c"&gt;# and not include in the listing.  Shell-style wildcarding is permitted.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
IndexIgnore .??&lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;~ &lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="c"&gt;# HEADER* README* RCS CVS *,v *,t&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# DefaultLanguage and AddLanguage allows you to specify the language of &lt;/span&gt;
&lt;span class="c"&gt;# a document. You can then use content negotiation to give a browser a &lt;/span&gt;
&lt;span class="c"&gt;# file in a language the user can understand.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Specify a default language. This means that all data&lt;/span&gt;
&lt;span class="c"&gt;# going out without a specific language tag (see below) will &lt;/span&gt;
&lt;span class="c"&gt;# be marked with this one. You probably do NOT want to set&lt;/span&gt;
&lt;span class="c"&gt;# this unless you are sure it is correct for all cases.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# * It is generally better to not mark a page as &lt;/span&gt;
&lt;span class="c"&gt;# * being a certain language than marking it with the wrong&lt;/span&gt;
&lt;span class="c"&gt;# * language!&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# DefaultLanguage nl&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Note 1: The suffix does not have to be the same as the language&lt;/span&gt;
&lt;span class="c"&gt;# keyword --- those with documents in Polish (whose net-standard&lt;/span&gt;
&lt;span class="c"&gt;# language code is pl) may wish to use "AddLanguage pl .po" to&lt;/span&gt;
&lt;span class="c"&gt;# avoid the ambiguity with the common suffix for perl scripts.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Note 2: The example entries below illustrate that in some cases &lt;/span&gt;
&lt;span class="c"&gt;# the two character 'Language' abbreviation is not identical to &lt;/span&gt;
&lt;span class="c"&gt;# the two character 'Country' code for its country,&lt;/span&gt;
&lt;span class="c"&gt;# E.g. 'Danmark/dk' versus 'Danish/da'.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Note 3: In the case of 'ltz' we violate the RFC by using a three char&lt;/span&gt;
&lt;span class="c"&gt;# specifier. There is 'work in progress' to fix this and get&lt;/span&gt;
&lt;span class="c"&gt;# the reference data for rfc1766 cleaned up.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)&lt;/span&gt;
&lt;span class="c"&gt;# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)&lt;/span&gt;
&lt;span class="c"&gt;# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)&lt;/span&gt;
&lt;span class="c"&gt;# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)&lt;/span&gt;
&lt;span class="c"&gt;# Norwegian (no) - Polish (pl) - Portugese (pt)&lt;/span&gt;
&lt;span class="c"&gt;# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)&lt;/span&gt;
&lt;span class="c"&gt;# Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage &lt;span class="nb"&gt;nl&lt;/span&gt; .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# LanguagePriority allows you to give precedence to some languages&lt;/span&gt;
&lt;span class="c"&gt;# in case of a tie during content negotiation.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Just list the languages in decreasing order of preference. We have&lt;/span&gt;
&lt;span class="c"&gt;# more or less alphabetized them here. You probably want to change this.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz &lt;span class="nb"&gt;nl &lt;/span&gt;nn no pl pt pt-BR ru sv zh-CN zh-TW

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# ForceLanguagePriority allows you to serve a result page rather than&lt;/span&gt;
&lt;span class="c"&gt;# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)&lt;/span&gt;
&lt;span class="c"&gt;# [in case no accepted languages matched the available variants]&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
ForceLanguagePriority Prefer Fallback

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Specify a default charset for all content served; this enables&lt;/span&gt;
&lt;span class="c"&gt;# interpretation of all content as UTF-8 by default.  To use the &lt;/span&gt;
&lt;span class="c"&gt;# default browser choice (ISO-8859-1), or to allow the META tags&lt;/span&gt;
&lt;span class="c"&gt;# in HTML content to override this choice, comment out this&lt;/span&gt;
&lt;span class="c"&gt;# directive:&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
AddDefaultCharset UTF-8

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# AddType allows you to add to or override the MIME configuration&lt;/span&gt;
&lt;span class="c"&gt;# file mime.types for specific file types.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#AddType application/x-tar .tgz&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# AddEncoding allows you to have certain browsers uncompress&lt;/span&gt;
&lt;span class="c"&gt;# information on the fly. Note: Not all browsers support this.&lt;/span&gt;
&lt;span class="c"&gt;# Despite the name similarity, the following Add* directives have nothing&lt;/span&gt;
&lt;span class="c"&gt;# to do with the FancyIndexing customization directives above.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#AddEncoding x-compress .Z&lt;/span&gt;
&lt;span class="c"&gt;#AddEncoding x-gzip .gz .tgz&lt;/span&gt;

&lt;span class="c"&gt;# If the AddEncoding directives above are commented-out, then you&lt;/span&gt;
&lt;span class="c"&gt;# probably should define those extensions to indicate media types:&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#   MIME-types for downloading Certificates and CRLs&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# AddHandler allows you to map certain file extensions to "handlers":&lt;/span&gt;
&lt;span class="c"&gt;# actions unrelated to filetype. These can be either built into the server&lt;/span&gt;
&lt;span class="c"&gt;# or added with the Action directive (see below)&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# To use CGI scripts outside of ScriptAliased directories:&lt;/span&gt;
&lt;span class="c"&gt;# (You will also need to add "ExecCGI" to the "Options" directive.)&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#AddHandler cgi-script .cgi&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# For files that include their own HTTP headers:&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#AddHandler send-as-is asis&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# For type maps (negotiated resources):&lt;/span&gt;
&lt;span class="c"&gt;# (This is enabled by default to allow the Apache "It Worked" page&lt;/span&gt;
&lt;span class="c"&gt;#  to be distributed in multiple languages.)&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
AddHandler type-map var

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Filters allow you to process content before it is sent to the client.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# To parse .shtml files for server-side includes (SSI):&lt;/span&gt;
&lt;span class="c"&gt;# (You will also need to add "Includes" to the "Options" directive.)&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Action lets you define media types that will execute a script whenever&lt;/span&gt;
&lt;span class="c"&gt;# a matching file is called. This eliminates the need for repeated URL&lt;/span&gt;
&lt;span class="c"&gt;# pathnames for oft-used CGI file processors.&lt;/span&gt;
&lt;span class="c"&gt;# Format: Action media/type /cgi-script/location&lt;/span&gt;
&lt;span class="c"&gt;# Format: Action handler-name /cgi-script/location&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Customizable error responses come in three flavors:&lt;/span&gt;
&lt;span class="c"&gt;# 1) plain text 2) local redirects 3) external redirects&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Some examples:&lt;/span&gt;
&lt;span class="c"&gt;#ErrorDocument 500 "The server made a boo boo."&lt;/span&gt;
&lt;span class="c"&gt;#ErrorDocument 404 /missing.html&lt;/span&gt;
&lt;span class="c"&gt;#ErrorDocument 404 "/cgi-bin/missing_handler.pl"&lt;/span&gt;
&lt;span class="c"&gt;#ErrorDocument 402 http://www.example.com/subscription_info.html&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Putting this all together, we can internationalize error responses.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# We use Alias to redirect any /error/HTTP_&amp;lt;error&amp;gt;.html.var response to&lt;/span&gt;
&lt;span class="c"&gt;# our collection of by-error message multi-language collections.  We use &lt;/span&gt;
&lt;span class="c"&gt;# includes to substitute the appropriate text.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# You can modify the messages' appearance without changing any of the&lt;/span&gt;
&lt;span class="c"&gt;# default HTTP_&amp;lt;error&amp;gt;.html.var files by adding the line:&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#   Alias /error/include/ "/your/include/path/"&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# which allows you to create your own set of files by starting with the&lt;/span&gt;
&lt;span class="c"&gt;# /var/www/error/include/ files and&lt;/span&gt;
&lt;span class="c"&gt;# copying them to /your/include/path/, even on a per-VirtualHost basis.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;

Alias /error/ &lt;span class="s2"&gt;"/var/www/error/"&lt;/span&gt;

&amp;lt;IfModule mod_negotiation.c&amp;gt;
&amp;lt;IfModule mod_include.c&amp;gt;
    &amp;lt;Directory &lt;span class="s2"&gt;"/var/www/error"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        AllowOverride None
        Options IncludesNoExec
        AddOutputFilter Includes html
        AddHandler type-map var
        Order allow,deny
        Allow from all
        LanguagePriority en es de fr
        ForceLanguagePriority Prefer Fallback
    &amp;lt;/Directory&amp;gt;

&lt;span class="c"&gt;#    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var&lt;/span&gt;
&lt;span class="c"&gt;#    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var&lt;/span&gt;
&lt;span class="c"&gt;#    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var&lt;/span&gt;
&lt;span class="c"&gt;#    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var&lt;/span&gt;
&lt;span class="c"&gt;#    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var&lt;/span&gt;
&lt;span class="c"&gt;#    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var&lt;/span&gt;
&lt;span class="c"&gt;#    ErrorDocument 410 /error/HTTP_GONE.html.var&lt;/span&gt;
&lt;span class="c"&gt;#    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var&lt;/span&gt;
&lt;span class="c"&gt;#    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var&lt;/span&gt;
&lt;span class="c"&gt;#    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var&lt;/span&gt;
&lt;span class="c"&gt;#    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var&lt;/span&gt;
&lt;span class="c"&gt;#    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var&lt;/span&gt;
&lt;span class="c"&gt;#    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var&lt;/span&gt;
&lt;span class="c"&gt;#    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var&lt;/span&gt;
&lt;span class="c"&gt;#    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var&lt;/span&gt;
&lt;span class="c"&gt;#    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var&lt;/span&gt;
&lt;span class="c"&gt;#    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var&lt;/span&gt;

&amp;lt;/IfModule&amp;gt;
&amp;lt;/IfModule&amp;gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# The following directives modify normal HTTP response behavior to&lt;/span&gt;
&lt;span class="c"&gt;# handle known problems with browser implementations.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
BrowserMatch &lt;span class="s2"&gt;"Mozilla/2"&lt;/span&gt; nokeepalive
BrowserMatch &lt;span class="s2"&gt;"MSIE 4&lt;/span&gt;&lt;span class="se"&gt;\.&lt;/span&gt;&lt;span class="s2"&gt;0b2;"&lt;/span&gt; nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch &lt;span class="s2"&gt;"RealPlayer 4&lt;/span&gt;&lt;span class="se"&gt;\.&lt;/span&gt;&lt;span class="s2"&gt;0"&lt;/span&gt; force-response-1.0
BrowserMatch &lt;span class="s2"&gt;"Java/1&lt;/span&gt;&lt;span class="se"&gt;\.&lt;/span&gt;&lt;span class="s2"&gt;0"&lt;/span&gt; force-response-1.0
BrowserMatch &lt;span class="s2"&gt;"JDK/1&lt;/span&gt;&lt;span class="se"&gt;\.&lt;/span&gt;&lt;span class="s2"&gt;0"&lt;/span&gt; force-response-1.0

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# The following directive disables redirects on non-GET requests for&lt;/span&gt;
&lt;span class="c"&gt;# a directory that does not include the trailing slash.  This fixes a &lt;/span&gt;
&lt;span class="c"&gt;# problem with Microsoft WebFolders which does not appropriately handle &lt;/span&gt;
&lt;span class="c"&gt;# redirects for folders with DAV methods.&lt;/span&gt;
&lt;span class="c"&gt;# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
BrowserMatch &lt;span class="s2"&gt;"Microsoft Data Access Internet Publishing Provider"&lt;/span&gt; redirect-carefully
BrowserMatch &lt;span class="s2"&gt;"MS FrontPage"&lt;/span&gt; redirect-carefully
BrowserMatch &lt;span class="s2"&gt;"^WebDrive"&lt;/span&gt; redirect-carefully
BrowserMatch &lt;span class="s2"&gt;"^WebDAVFS/1.[0123]"&lt;/span&gt; redirect-carefully
BrowserMatch &lt;span class="s2"&gt;"^gnome-vfs/1.0"&lt;/span&gt; redirect-carefully
BrowserMatch &lt;span class="s2"&gt;"^XML Spy"&lt;/span&gt; redirect-carefully
BrowserMatch &lt;span class="s2"&gt;"^Dreamweaver-WebDAV-SCM1"&lt;/span&gt; redirect-carefully

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Allow server status reports generated by mod_status,&lt;/span&gt;
&lt;span class="c"&gt;# with the URL of http://servername/server-status&lt;/span&gt;
&lt;span class="c"&gt;# Change the ".example.com" to match your domain to enable.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#&amp;lt;Location /server-status&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;#    SetHandler server-status&lt;/span&gt;
&lt;span class="c"&gt;#    Order deny,allow&lt;/span&gt;
&lt;span class="c"&gt;#    Deny from all&lt;/span&gt;
&lt;span class="c"&gt;#    Allow from .example.com&lt;/span&gt;
&lt;span class="c"&gt;#&amp;lt;/Location&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Allow remote server configuration reports, with the URL of&lt;/span&gt;
&lt;span class="c"&gt;#  http://servername/server-info (requires that mod_info.c be loaded).&lt;/span&gt;
&lt;span class="c"&gt;# Change the ".example.com" to match your domain to enable.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#&amp;lt;Location /server-info&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;#    SetHandler server-info&lt;/span&gt;
&lt;span class="c"&gt;#    Order deny,allow&lt;/span&gt;
&lt;span class="c"&gt;#    Deny from all&lt;/span&gt;
&lt;span class="c"&gt;#    Allow from .example.com&lt;/span&gt;
&lt;span class="c"&gt;#&amp;lt;/Location&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Proxy Server directives. Uncomment the following lines to&lt;/span&gt;
&lt;span class="c"&gt;# enable the proxy server:&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#&amp;lt;IfModule mod_proxy.c&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;#ProxyRequests On&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#&amp;lt;Proxy *&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;#    Order deny,allow&lt;/span&gt;
&lt;span class="c"&gt;#    Deny from all&lt;/span&gt;
&lt;span class="c"&gt;#    Allow from .example.com&lt;/span&gt;
&lt;span class="c"&gt;#&amp;lt;/Proxy&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Enable/disable the handling of HTTP/1.1 "Via:" headers.&lt;/span&gt;
&lt;span class="c"&gt;# ("Full" adds the server version; "Block" removes all outgoing Via: headers)&lt;/span&gt;
&lt;span class="c"&gt;# Set to one of: Off | On | Full | Block&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#ProxyVia On&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# To enable a cache of proxied content, uncomment the following lines.&lt;/span&gt;
&lt;span class="c"&gt;# See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#&amp;lt;IfModule mod_disk_cache.c&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;#   CacheEnable disk /&lt;/span&gt;
&lt;span class="c"&gt;#   CacheRoot "/var/cache/mod_proxy"&lt;/span&gt;
&lt;span class="c"&gt;#&amp;lt;/IfModule&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;

&lt;span class="c"&gt;#&amp;lt;/IfModule&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;# End of proxy directives.&lt;/span&gt;

&lt;span class="c"&gt;### Section 3: Virtual Hosts&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# VirtualHost: If you want to maintain multiple domains/hostnames on your&lt;/span&gt;
&lt;span class="c"&gt;# machine you can setup VirtualHost containers for them. Most configurations&lt;/span&gt;
&lt;span class="c"&gt;# use only name-based virtual hosts so the server doesn't need to worry about&lt;/span&gt;
&lt;span class="c"&gt;# IP addresses. This is indicated by the asterisks in the directives below.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Please see the documentation at &lt;/span&gt;
&lt;span class="c"&gt;# &amp;lt;URL:http://httpd.apache.org/docs/2.2/vhosts/&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;# for further details before you try to setup virtual hosts.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# You may use the command line option '-S' to verify your virtual host&lt;/span&gt;
&lt;span class="c"&gt;# configuration.&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Use name-based virtual hosting.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#NameVirtualHost *:80&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# NOTE: NameVirtualHost cannot be used without a port specifier &lt;/span&gt;
&lt;span class="c"&gt;# (e.g. :80) if mod_ssl is being used, due to the nature of the&lt;/span&gt;
&lt;span class="c"&gt;# SSL protocol.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;

&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# VirtualHost example:&lt;/span&gt;
&lt;span class="c"&gt;# Almost any Apache directive may go into a VirtualHost container.&lt;/span&gt;
&lt;span class="c"&gt;# The first VirtualHost section is used for requests without a known&lt;/span&gt;
&lt;span class="c"&gt;# server name.&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#&amp;lt;VirtualHost *:80&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;#    ServerAdmin webmaster@dummy-host.example.com&lt;/span&gt;
&lt;span class="c"&gt;#    DocumentRoot /www/docs/dummy-host.example.com&lt;/span&gt;
&lt;span class="c"&gt;#    ServerName dummy-host.example.com&lt;/span&gt;
&lt;span class="c"&gt;#    ErrorLog logs/dummy-host.example.com-error_log&lt;/span&gt;
&lt;span class="c"&gt;#    CustomLog logs/dummy-host.example.com-access_log common&lt;/span&gt;
&lt;span class="c"&gt;#&amp;lt;/VirtualHost&amp;gt;&lt;/span&gt;
&amp;lt;VirtualHost &lt;span class="k"&gt;*&lt;/span&gt;:80&amp;gt;
   ServerName 127.0.0.1 
   &lt;span class="c"&gt;# !!! Be sure to point DocumentRoot to 'public'!&lt;/span&gt;
   DocumentRoot /home/web/appcode/store/public    
   &amp;lt;Directory /home/web/appcode/store/public&amp;gt;
      Allow from all
   &amp;lt;/Directory&amp;gt;
&amp;lt;/VirtualHost&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;当我配置好后启动 httpd 后总是出现：&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;403  You don&lt;span class="s1"&gt;'t have permission to access /products on this server.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;网上搜了很多方式都没有得以解决，大家帮忙看看问题出哪儿了&lt;/p&gt;</description>
      <author>xiaoTao</author>
      <pubDate>Thu, 22 Aug 2013 11:38:59 +0800</pubDate>
      <link>https://ruby-china.org/topics/13515</link>
      <guid>https://ruby-china.org/topics/13515</guid>
    </item>
    <item>
      <title>Sunspot 多 model 附带条件搜索实现</title>
      <description>&lt;p&gt;我有这样一个需求：利用 sunspot 对两个 model 进行检索，并附带其中一个 model 的属性的条件，如其中一个 model 是 Topic，另一个是 Attachment，我要检索包含关键字的 Topic 和 Attachment，并且 Attachment 的 a_type = ‘Topic'，下面是我的写法：&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt; &lt;span class="no"&gt;Sunspot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;Attachment&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;Topic&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
      &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fulltext&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:search&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
      &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;with&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:a_type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Topic'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这样能够检索出含有关键字的 Attachment 而对于 Topic 也给附加了 a_type = 'Topic'条件，因此查出的结果明显不对，请问这个正确的做法应该是怎样呢？谢谢 &lt;a href="/huacnlee" class="user-mention" title="@huacnlee"&gt;&lt;i&gt;@&lt;/i&gt;huacnlee&lt;/a&gt; 、&lt;a href="/lgn21st" class="user-mention" title="@lgn21st"&gt;&lt;i&gt;@&lt;/i&gt;lgn21st&lt;/a&gt;、 &lt;a href="/poshboytl" class="user-mention" title="@poshboytl"&gt;&lt;i&gt;@&lt;/i&gt;poshboytl&lt;/a&gt;&lt;/p&gt;</description>
      <author>xiaoTao</author>
      <pubDate>Thu, 26 Jul 2012 23:05:11 +0800</pubDate>
      <link>https://ruby-china.org/topics/4578</link>
      <guid>https://ruby-china.org/topics/4578</guid>
    </item>
  </channel>
</rss>
