fedora 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ fedora.gemspec
2
+ pkg/
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ # Rakefile
2
+ begin
3
+ require 'jeweler'
4
+ Jeweler::Tasks.new do |gemspec|
5
+ gemspec.name = "fedora"
6
+ gemspec.summary = "Set of capistrano recipies for automating creation of Fedora servers."
7
+ gemspec.description = "Set of capistrano recipies for automating creation of Fedora servers."
8
+ gemspec.email = "Adman1965@gmail.com"
9
+ gemspec.homepage = "http://github.com/Adman65/fedora"
10
+ gemspec.authors = ["Adam Hawkins"]
11
+ end
12
+ Jeweler::GemcutterTasks.new
13
+ rescue LoadError
14
+ puts "Jeweler not available. Install it with: sudo gem install jeweler -s http://gemcutter.org"
15
+ end
16
+
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
data/lib/fedora.rb ADDED
@@ -0,0 +1,4 @@
1
+ require 'capistrano'
2
+ require 'helpers'
3
+
4
+ Dir.glob("#{File.dirname(__FILE__)}/recipes/**/*.rb").each { |file| load file }
data/lib/helpers.rb ADDED
@@ -0,0 +1,63 @@
1
+ require 'erb'
2
+
3
+ def yum_install(packages)
4
+ sudo "yum -y install #{packages.is_a?(Array) ? packages.join(' ') : packages}"
5
+ end
6
+
7
+ def yum_group_install(groups)
8
+ if groups.is_a? Array
9
+ groups = groups.map {|group| '"' + group + '"'}.join ' '
10
+ else
11
+ groups = "\"#{groups}\""
12
+ end
13
+
14
+ sudo "yum -y groupinstall #{groups}"
15
+ end
16
+
17
+ def service(serv, op)
18
+ sudo "service #{serv} #{op}"
19
+ end
20
+
21
+ def chkconfig(serv, mode)
22
+ sudo "chkconfig #{serv} #{mode}"
23
+ end
24
+
25
+ # macro method for defining tasks that just call services
26
+ # by default generates tasks to start/stop/restart servics
27
+ def services(serv, role, ops=['start','stop','restart'])
28
+ ops.each do |op|
29
+ desc "#{op} #{serv} service"
30
+ task op, :role => role do
31
+ service serv, op
32
+ end
33
+ end
34
+ end
35
+
36
+ # macro method for defining tasks that just call chkconfig
37
+ # by default generates tasks to turn on/off services
38
+ def chkconfigs(serv, role)
39
+ desc "Enable the #{serv} sevice"
40
+ task :enable, :role => role do
41
+ chkconfig serv, 'on'
42
+ end
43
+
44
+ desc "Diable the #{serv} sevice"
45
+ task :disable, :role => role do
46
+ chkconfig serv, 'off'
47
+ end
48
+ end
49
+
50
+ def password_prompt prompt
51
+ password, password2 = 'a', 'b'
52
+ puts prompt
53
+ until password.eql? password2 do
54
+ password = Capistrano::CLI.password_prompt "password: "
55
+ password2 = Capistrano::CLI.password_prompt "confirm password: "
56
+ end
57
+ password
58
+ end
59
+
60
+ def render(file,binding)
61
+ template = File.read("#{File.dirname(__FILE__)}/templates/#{file}.erb")
62
+ result = ERB.new(template).result(binding)
63
+ end
@@ -0,0 +1,17 @@
1
+ Capistrano::Configuration.instance(:must_exist).load do
2
+ namespace :apache do
3
+ services 'httpd', :web, ['start','stop','restart','reload']
4
+ chkconfigs 'httpd', :web
5
+
6
+ desc "Setup a basic apache installation"
7
+ task :setup, :roles => [:web, :app] do
8
+ yum_group_install 'Web Server'
9
+ sudo "mkdir -p /etc/httpd/vhost.d"
10
+ put render('httpd.conf',binding), '/tmp/httpd.conf'
11
+ sudo "mv /tmp/httpd.conf /etc/httpd/conf/httpd.conf"
12
+ start
13
+ enable
14
+ puts "Put your vhost definitions in /etc/httpd/vhost.d/site_name.vhost"
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,13 @@
1
+ Capistrano::Configuration.instance(:must_exist).load do
2
+ namespace :ftp do
3
+ services 'vsftpd', :web, ['start','stop','restart','reload']
4
+ chkconfigs 'vsftpd', :web
5
+
6
+ desc "Setup a basic FTP installation"
7
+ task :setup, :roles => :web do
8
+ yum_group_install 'FTP Server'
9
+ start
10
+ enable
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,15 @@
1
+ Capistrano::Configuration.instance(:must_exist).load do
2
+ namespace :git do
3
+ desc "Setup git"
4
+ task :setup, :roles => :app do
5
+ yum_install ['git','gitk']
6
+ configure
7
+ end
8
+
9
+ task :configure, :roles => :app do
10
+ puts "Configuring git...."
11
+ run "git config --global user.name '#{Capistrano::CLI.ui.ask "Your name: "}'"
12
+ run "git config --global user.email '#{Capistrano::CLI.ui.ask "Your email: "}'"
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,33 @@
1
+ Capistrano::Configuration.instance(:must_exist).load do
2
+ namespace :mysql do
3
+ services 'mysqld', :db
4
+ chkconfigs 'mysqld', :db
5
+
6
+ desc "Setup a basic MySQL server"
7
+ task :setup, :roles => :db do
8
+ yum_group_install 'MySQL Sever'
9
+ start
10
+ enable
11
+ configure
12
+ end
13
+
14
+ task :configure, :roles => :db do
15
+ password = password_prompt "Enter new root password."
16
+ sudo "mysqladmin -u root password '#{password}'"
17
+ end
18
+
19
+ desc "Installs phpMyAdmin on the web server"
20
+ task :phpMyAdmin, :roles => :web do
21
+ yum_install 'phpMyAdmin'
22
+ phpMyAdmin_remote
23
+ apache.reload
24
+ end
25
+
26
+ task :phpMyAdmin_remote, :roles => :web do
27
+ ip = Capistrano::CLI.ui.ask "What's your ip: "
28
+ put render('phpMyAdmin.conf',binding), '/tmp/phpMyAdmin.conf'
29
+ sudo "mv /tmp/phpMyAdmin.conf /etc/httpd/conf.d/phpMyAdmin.conf"
30
+ apache.reload
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,35 @@
1
+ Capistrano::Configuration.instance(:must_exist).load do
2
+ namespace :postgresql do
3
+ services 'postgresql', :db
4
+ chkconfigs 'posgresql', :db
5
+
6
+ desc "Setup a basic PostgreSQL server"
7
+ task :setup, :roles => :db do
8
+ yum_group_install 'PostgreSQL Server'
9
+ puts "Starting initialization....please wait"
10
+ sudo "/etc/init.d/postgresql initdb"
11
+ configure
12
+ start
13
+ enable
14
+ end
15
+
16
+ task :configure, :roles => :db do
17
+ puts "Setting postgres password...."
18
+ sudo "passwd postrges"
19
+ end
20
+
21
+ desc "Setup phpPGAdmin"
22
+ task :phpPgAdmin, :roles => :db do
23
+ yum_install 'phpPgAdmin'
24
+ phpPgAdmin_remote
25
+ apache.reload
26
+ end
27
+
28
+ task :phpPgAdmin_remote, :roles => :web do
29
+ ip = Capistrano::CLI.ui.ask "What's your ip: "
30
+ put render('phpPgAdmin.conf',binding), '/tmp/phpPgAdmin.conf'
31
+ sudo "mv /tmp/phpPgAdmin.conf /etc/httpd/conf.d/phpPgAdmin.conf"
32
+ apache.reload
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,10 @@
1
+ Capistrano::Configuration.instance(:must_exist).load do
2
+ namespace :python do
3
+ desc "Setup a basic python installation"
4
+ task :setup, :roles => :app do
5
+ packages = ['python','python-setuptools', 'python-setuptools-devel',
6
+ 'python-imaging', 'python-imaging-devel']
7
+ yum_install packages
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,42 @@
1
+ Capistrano::Configuration.instance(:must_exist).load do
2
+ namespace :ruby do
3
+ desc "Install common Ruby components"
4
+ task :setup, :roles => :app do
5
+ yum_install ['gcc','make','ruby', 'ruby-devel', 'rubygems']
6
+ setup_gems
7
+ install_common_gems
8
+ rmagick
9
+ end
10
+
11
+ task :setup_gems, :roles => :app do
12
+ sudo "gem update --system"
13
+ sudo "gem sources -a http://gems.github.com"
14
+ sudo "gem update"
15
+ end
16
+
17
+ task :install_common_gems, :roles => :app do
18
+ gems = ['rspec','cucumber','ZenTest','mocha', 'authlogic','capistrano',
19
+ 'nifty-generators', 'gemcutter']
20
+ sudo "gem install #{gems.join ' '}"
21
+ sudo "gem tumble"
22
+ end
23
+
24
+ task :rmagick, :roles => :app do
25
+ yum_install ['gcc','gcc-c++','ImageMagick','ImageMagick-devel']
26
+ sudo "gem install rmagick"
27
+ end
28
+
29
+ desc "Setup Ruby w/Postgres"
30
+ task :postgres, :roles => :app do
31
+ yum_install 'postgresql-devel'
32
+ gems = ['pg', 'postgres']
33
+ sudo "gem install #{gems.join ' '}"
34
+ end
35
+
36
+ desc "Setup Ruby w/MySQL"
37
+ task :mysql, :roles => :app do
38
+ yum_install 'mysql-devel'
39
+ sudo "gem install mysql"
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,13 @@
1
+ Capistrano::Configuration.instance(:must_exist).load do
2
+ namespace :yum do
3
+ desc "Update all packages"
4
+ task :update do
5
+ sudo "yum -y update"
6
+ end
7
+
8
+ desc "Add RPMFusion repo"
9
+ task :fusion do
10
+ sudo "rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm"
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,10 @@
1
+ Capistrano::Configuration.instance(:must_exist).load do
2
+ namespace :django do
3
+ desc "Setup a basic django installation"
4
+ task :setup do
5
+ yum_install ['mod_python', 'mod_wsgi']
6
+ sudo "easy_install django"
7
+ apache.reload
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,34 @@
1
+ Capistrano::Configuration.instance(:must_exist).load do
2
+ namespace :rails do
3
+ desc "Setup a basic Rails installation"
4
+ task :setup, :roles => :app do
5
+ gems = ['rails','jscruggs-metric_fu','paperclip','authlogic','rspec-rails','nifty-generators','bluecloth','RedCloth',
6
+ 'shoulda','shoulda-addons','flexmock','mocha','haml','machinist','forgery','faker','sphinx','thinking-sphinx','passenger']
7
+ sudo "gem install #{gems.join(' ')}"
8
+ setup_passenger
9
+ end
10
+
11
+ desc "Setup Passenger"
12
+ task :setup_passenger, :roles => :app do
13
+ packages = ['gcc','gcc-c++','httpd-devel','apr-devel','apr-util','apr-util-devel']
14
+ yum_install packages
15
+ sudo "passenger-install-apache2-module --auto"
16
+ ruby_path = capture("which ruby", :via => :sudo).chomp
17
+ passenger_root = capture("passenger-config --root", :via => :sudo).chomp
18
+ put render('passenger.conf',binding), '/tmp/passenger.conf'
19
+ sudo "mv /tmp/passenger.conf /etc/httpd/conf.d/passenger.conf"
20
+ apache.reload
21
+ end
22
+
23
+ desc "Create a vhost for passenger deployment"
24
+ task :vhost do
25
+ app_name = Capistrano::CLI.ui.ask "App name: "
26
+ app_path = Capistrano::CLI.ui.ask "App path (don't include /public): "
27
+ url = Capistrano::CLI.ui.ask "Domain: "
28
+ put render('passenger.vhost',binding), "/tmp/#{app_name}.vhost"
29
+ sudo "mkdir -p /etc/httpd/vhost.d"
30
+ sudo "mv /tmp/#{app_name}.vhost /etc/httpd/vhost.d/"
31
+ apache.reload
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,997 @@
1
+ #
2
+ # This is the main Apache server configuration file. It contains the
3
+ # configuration directives that give the server its instructions.
4
+ # See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
5
+ # In particular, see
6
+ # <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
7
+ # for a discussion of each configuration directive.
8
+ #
9
+ #
10
+ # Do NOT simply read the instructions in here without understanding
11
+ # what they do. They're here only as hints or reminders. If you are unsure
12
+ # consult the online docs. You have been warned.
13
+ #
14
+ # The configuration directives are grouped into three basic sections:
15
+ # 1. Directives that control the operation of the Apache server process as a
16
+ # whole (the 'global environment').
17
+ # 2. Directives that define the parameters of the 'main' or 'default' server,
18
+ # which responds to requests that aren't handled by a virtual host.
19
+ # These directives also provide default values for the settings
20
+ # of all virtual hosts.
21
+ # 3. Settings for virtual hosts, which allow Web requests to be sent to
22
+ # different IP addresses or hostnames and have them handled by the
23
+ # same Apache server process.
24
+ #
25
+ # Configuration and logfile names: If the filenames you specify for many
26
+ # of the server's control files begin with "/" (or "drive:/" for Win32), the
27
+ # server will use that explicit path. If the filenames do *not* begin
28
+ # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
29
+ # with ServerRoot set to "/etc/httpd" will be interpreted by the
30
+ # server as "/etc/httpd/logs/foo.log".
31
+ #
32
+
33
+ ### Section 1: Global Environment
34
+ #
35
+ # The directives in this section affect the overall operation of Apache,
36
+ # such as the number of concurrent requests it can handle or where it
37
+ # can find its configuration files.
38
+ #
39
+
40
+ #
41
+ # Don't give away too much information about all the subcomponents
42
+ # we are running. Comment out this line if you don't mind remote sites
43
+ # finding out what major optional modules you are running
44
+ ServerTokens OS
45
+
46
+ #
47
+ # ServerRoot: The top of the directory tree under which the server's
48
+ # configuration, error, and log files are kept.
49
+ #
50
+ # NOTE! If you intend to place this on an NFS (or otherwise network)
51
+ # mounted filesystem then please read the LockFile documentation
52
+ # (available at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);
53
+ # you will save yourself a lot of trouble.
54
+ #
55
+ # Do NOT add a slash at the end of the directory path.
56
+ #
57
+ ServerRoot "/etc/httpd"
58
+
59
+ #
60
+ # PidFile: The file in which the server should record its process
61
+ # identification number when it starts.
62
+ #
63
+ PidFile run/httpd.pid
64
+
65
+ #
66
+ # Timeout: The number of seconds before receives and sends time out.
67
+ #
68
+ Timeout 120
69
+
70
+ #
71
+ # KeepAlive: Whether or not to allow persistent connections (more than
72
+ # one request per connection). Set to "Off" to deactivate.
73
+ #
74
+ KeepAlive Off
75
+
76
+ #
77
+ # MaxKeepAliveRequests: The maximum number of requests to allow
78
+ # during a persistent connection. Set to 0 to allow an unlimited amount.
79
+ # We recommend you leave this number high, for maximum performance.
80
+ #
81
+ MaxKeepAliveRequests 100
82
+
83
+ #
84
+ # KeepAliveTimeout: Number of seconds to wait for the next request from the
85
+ # same client on the same connection.
86
+ #
87
+ KeepAliveTimeout 15
88
+
89
+ ##
90
+ ## Server-Pool Size Regulation (MPM specific)
91
+ ##
92
+
93
+ # prefork MPM
94
+ # StartServers: number of server processes to start
95
+ # MinSpareServers: minimum number of server processes which are kept spare
96
+ # MaxSpareServers: maximum number of server processes which are kept spare
97
+ # ServerLimit: maximum value for MaxClients for the lifetime of the server
98
+ # MaxClients: maximum number of server processes allowed to start
99
+ # MaxRequestsPerChild: maximum number of requests a server process serves
100
+ <IfModule prefork.c>
101
+ StartServers 8
102
+ MinSpareServers 5
103
+ MaxSpareServers 20
104
+ ServerLimit 256
105
+ MaxClients 256
106
+ MaxRequestsPerChild 4000
107
+ </IfModule>
108
+
109
+ # worker MPM
110
+ # StartServers: initial number of server processes to start
111
+ # MaxClients: maximum number of simultaneous client connections
112
+ # MinSpareThreads: minimum number of worker threads which are kept spare
113
+ # MaxSpareThreads: maximum number of worker threads which are kept spare
114
+ # ThreadsPerChild: constant number of worker threads in each server process
115
+ # MaxRequestsPerChild: maximum number of requests a server process serves
116
+ <IfModule worker.c>
117
+ StartServers 2
118
+ MaxClients 150
119
+ MinSpareThreads 25
120
+ MaxSpareThreads 75
121
+ ThreadsPerChild 25
122
+ MaxRequestsPerChild 0
123
+ </IfModule>
124
+
125
+ #
126
+ # Listen: Allows you to bind Apache to specific IP addresses and/or
127
+ # ports, in addition to the default. See also the <VirtualHost>
128
+ # directive.
129
+ #
130
+ # Change this to Listen on specific IP addresses as shown below to
131
+ # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
132
+ #
133
+ #Listen 12.34.56.78:80
134
+ Listen 80
135
+
136
+ #
137
+ # Dynamic Shared Object (DSO) Support
138
+ #
139
+ # To be able to use the functionality of a module which was built as a DSO you
140
+ # have to place corresponding `LoadModule' lines at this location so the
141
+ # directives contained in it are actually available _before_ they are used.
142
+ # Statically compiled modules (those listed by `httpd -l') do not need
143
+ # to be loaded here.
144
+ #
145
+ # Example:
146
+ # LoadModule foo_module modules/mod_foo.so
147
+ #
148
+ LoadModule auth_basic_module modules/mod_auth_basic.so
149
+ LoadModule auth_digest_module modules/mod_auth_digest.so
150
+ LoadModule authn_file_module modules/mod_authn_file.so
151
+ LoadModule authn_alias_module modules/mod_authn_alias.so
152
+ LoadModule authn_anon_module modules/mod_authn_anon.so
153
+ LoadModule authn_dbm_module modules/mod_authn_dbm.so
154
+ LoadModule authn_default_module modules/mod_authn_default.so
155
+ LoadModule authz_host_module modules/mod_authz_host.so
156
+ LoadModule authz_user_module modules/mod_authz_user.so
157
+ LoadModule authz_owner_module modules/mod_authz_owner.so
158
+ LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
159
+ LoadModule authz_dbm_module modules/mod_authz_dbm.so
160
+ LoadModule authz_default_module modules/mod_authz_default.so
161
+ LoadModule ldap_module modules/mod_ldap.so
162
+ LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
163
+ LoadModule include_module modules/mod_include.so
164
+ LoadModule log_config_module modules/mod_log_config.so
165
+ LoadModule logio_module modules/mod_logio.so
166
+ LoadModule env_module modules/mod_env.so
167
+ LoadModule ext_filter_module modules/mod_ext_filter.so
168
+ LoadModule mime_magic_module modules/mod_mime_magic.so
169
+ LoadModule expires_module modules/mod_expires.so
170
+ LoadModule deflate_module modules/mod_deflate.so
171
+ LoadModule headers_module modules/mod_headers.so
172
+ LoadModule usertrack_module modules/mod_usertrack.so
173
+ LoadModule setenvif_module modules/mod_setenvif.so
174
+ LoadModule mime_module modules/mod_mime.so
175
+ LoadModule dav_module modules/mod_dav.so
176
+ LoadModule status_module modules/mod_status.so
177
+ LoadModule autoindex_module modules/mod_autoindex.so
178
+ LoadModule info_module modules/mod_info.so
179
+ LoadModule dav_fs_module modules/mod_dav_fs.so
180
+ LoadModule vhost_alias_module modules/mod_vhost_alias.so
181
+ LoadModule negotiation_module modules/mod_negotiation.so
182
+ LoadModule dir_module modules/mod_dir.so
183
+ LoadModule actions_module modules/mod_actions.so
184
+ LoadModule speling_module modules/mod_speling.so
185
+ LoadModule userdir_module modules/mod_userdir.so
186
+ LoadModule alias_module modules/mod_alias.so
187
+ LoadModule rewrite_module modules/mod_rewrite.so
188
+ LoadModule proxy_module modules/mod_proxy.so
189
+ LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
190
+ LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
191
+ LoadModule proxy_http_module modules/mod_proxy_http.so
192
+ LoadModule proxy_connect_module modules/mod_proxy_connect.so
193
+ LoadModule cache_module modules/mod_cache.so
194
+ LoadModule suexec_module modules/mod_suexec.so
195
+ LoadModule disk_cache_module modules/mod_disk_cache.so
196
+ LoadModule cgi_module modules/mod_cgi.so
197
+
198
+ #
199
+ # The following modules are not loaded by default:
200
+ #
201
+ #LoadModule cern_meta_module modules/mod_cern_meta.so
202
+ #LoadModule asis_module modules/mod_asis.so
203
+
204
+ #
205
+ # Load config files from the config directory "/etc/httpd/conf.d".
206
+ #
207
+ Include conf.d/*.conf
208
+
209
+ #
210
+ # ExtendedStatus controls whether Apache will generate "full" status
211
+ # information (ExtendedStatus On) or just basic information (ExtendedStatus
212
+ # Off) when the "server-status" handler is called. The default is Off.
213
+ #
214
+ #ExtendedStatus On
215
+
216
+ #
217
+ # If you wish httpd to run as a different user or group, you must run
218
+ # httpd as root initially and it will switch.
219
+ #
220
+ # User/Group: The name (or #number) of the user/group to run httpd as.
221
+ # . On SCO (ODT 3) use "User nouser" and "Group nogroup".
222
+ # . On HPUX you may not be able to use shared memory as nobody, and the
223
+ # suggested workaround is to create a user www and use that user.
224
+ # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
225
+ # when the value of (unsigned)Group is above 60000;
226
+ # don't use Group #-1 on these systems!
227
+ #
228
+ User apache
229
+ Group apache
230
+
231
+ ### Section 2: 'Main' server configuration
232
+ #
233
+ # The directives in this section set up the values used by the 'main'
234
+ # server, which responds to any requests that aren't handled by a
235
+ # <VirtualHost> definition. These values also provide defaults for
236
+ # any <VirtualHost> containers you may define later in the file.
237
+ #
238
+ # All of these directives may appear inside <VirtualHost> containers,
239
+ # in which case these default settings will be overridden for the
240
+ # virtual host being defined.
241
+ #
242
+
243
+ #
244
+ # ServerAdmin: Your address, where problems with the server should be
245
+ # e-mailed. This address appears on some server-generated pages, such
246
+ # as error documents. e.g. admin@your-domain.com
247
+ #
248
+ ServerAdmin root@localhost
249
+
250
+ #
251
+ # ServerName gives the name and port that the server uses to identify itself.
252
+ # This can often be determined automatically, but we recommend you specify
253
+ # it explicitly to prevent problems during startup.
254
+ #
255
+ # If this is not set to valid DNS name for your host, server-generated
256
+ # redirections will not work. See also the UseCanonicalName directive.
257
+ #
258
+ # If your host doesn't have a registered DNS name, enter its IP address here.
259
+ # You will have to access it by its address anyway, and this will make
260
+ # redirections work in a sensible way.
261
+ #
262
+ #ServerName www.example.com:80
263
+
264
+ #
265
+ # UseCanonicalName: Determines how Apache constructs self-referencing
266
+ # URLs and the SERVER_NAME and SERVER_PORT variables.
267
+ # When set "Off", Apache will use the Hostname and Port supplied
268
+ # by the client. When set "On", Apache will use the value of the
269
+ # ServerName directive.
270
+ #
271
+ UseCanonicalName Off
272
+
273
+ #
274
+ # DocumentRoot: The directory out of which you will serve your
275
+ # documents. By default, all requests are taken from this directory, but
276
+ # symbolic links and aliases may be used to point to other locations.
277
+ #
278
+ DocumentRoot "/var/www/html"
279
+
280
+ #
281
+ # Each directory to which Apache has access can be configured with respect
282
+ # to which services and features are allowed and/or disabled in that
283
+ # directory (and its subdirectories).
284
+ #
285
+ # First, we configure the "default" to be a very restrictive set of
286
+ # features.
287
+ #
288
+ <Directory />
289
+ Options FollowSymLinks
290
+ AllowOverride None
291
+ </Directory>
292
+
293
+ #
294
+ # Note that from this point forward you must specifically allow
295
+ # particular features to be enabled - so if something's not working as
296
+ # you might expect, make sure that you have specifically enabled it
297
+ # below.
298
+ #
299
+
300
+ #
301
+ # This should be changed to whatever you set DocumentRoot to.
302
+ #
303
+ <Directory "/var/www/html">
304
+
305
+ #
306
+ # Possible values for the Options directive are "None", "All",
307
+ # or any combination of:
308
+ # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
309
+ #
310
+ # Note that "MultiViews" must be named *explicitly* --- "Options All"
311
+ # doesn't give it to you.
312
+ #
313
+ # The Options directive is both complicated and important. Please see
314
+ # http://httpd.apache.org/docs/2.2/mod/core.html#options
315
+ # for more information.
316
+ #
317
+ Options Indexes FollowSymLinks
318
+
319
+ #
320
+ # AllowOverride controls what directives may be placed in .htaccess files.
321
+ # It can be "All", "None", or any combination of the keywords:
322
+ # Options FileInfo AuthConfig Limit
323
+ #
324
+ AllowOverride None
325
+
326
+ #
327
+ # Controls who can get stuff from this server.
328
+ #
329
+ Order allow,deny
330
+ Allow from all
331
+
332
+ </Directory>
333
+
334
+ #
335
+ # UserDir: The name of the directory that is appended onto a user's home
336
+ # directory if a ~user request is received.
337
+ #
338
+ # The path to the end user account 'public_html' directory must be
339
+ # accessible to the webserver userid. This usually means that ~userid
340
+ # must have permissions of 711, ~userid/public_html must have permissions
341
+ # of 755, and documents contained therein must be world-readable.
342
+ # Otherwise, the client will only receive a "403 Forbidden" message.
343
+ #
344
+ # See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
345
+ #
346
+ <IfModule mod_userdir.c>
347
+ #
348
+ # UserDir is disabled by default since it can confirm the presence
349
+ # of a username on the system (depending on home directory
350
+ # permissions).
351
+ #
352
+ UserDir disabled
353
+
354
+ #
355
+ # To enable requests to /~user/ to serve the user's public_html
356
+ # directory, remove the "UserDir disabled" line above, and uncomment
357
+ # the following line instead:
358
+ #
359
+ #UserDir public_html
360
+
361
+ </IfModule>
362
+
363
+ #
364
+ # Control access to UserDir directories. The following is an example
365
+ # for a site where these directories are restricted to read-only.
366
+ #
367
+ #<Directory /home/*/public_html>
368
+ # AllowOverride FileInfo AuthConfig Limit
369
+ # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
370
+ # <Limit GET POST OPTIONS>
371
+ # Order allow,deny
372
+ # Allow from all
373
+ # </Limit>
374
+ # <LimitExcept GET POST OPTIONS>
375
+ # Order deny,allow
376
+ # Deny from all
377
+ # </LimitExcept>
378
+ #</Directory>
379
+
380
+ #
381
+ # DirectoryIndex: sets the file that Apache will serve if a directory
382
+ # is requested.
383
+ #
384
+ # The index.html.var file (a type-map) is used to deliver content-
385
+ # negotiated documents. The MultiViews Option can be used for the
386
+ # same purpose, but it is much slower.
387
+ #
388
+ DirectoryIndex index.html index.html.var
389
+
390
+ #
391
+ # AccessFileName: The name of the file to look for in each directory
392
+ # for additional configuration directives. See also the AllowOverride
393
+ # directive.
394
+ #
395
+ AccessFileName .htaccess
396
+
397
+ #
398
+ # The following lines prevent .htaccess and .htpasswd files from being
399
+ # viewed by Web clients.
400
+ #
401
+ <Files ~ "^\.ht">
402
+ Order allow,deny
403
+ Deny from all
404
+ </Files>
405
+
406
+ #
407
+ # TypesConfig describes where the mime.types file (or equivalent) is
408
+ # to be found.
409
+ #
410
+ TypesConfig /etc/mime.types
411
+
412
+ #
413
+ # DefaultType is the default MIME type the server will use for a document
414
+ # if it cannot otherwise determine one, such as from filename extensions.
415
+ # If your server contains mostly text or HTML documents, "text/plain" is
416
+ # a good value. If most of your content is binary, such as applications
417
+ # or images, you may want to use "application/octet-stream" instead to
418
+ # keep browsers from trying to display binary files as though they are
419
+ # text.
420
+ #
421
+ DefaultType text/plain
422
+
423
+ #
424
+ # The mod_mime_magic module allows the server to use various hints from the
425
+ # contents of the file itself to determine its type. The MIMEMagicFile
426
+ # directive tells the module where the hint definitions are located.
427
+ #
428
+ <IfModule mod_mime_magic.c>
429
+ # MIMEMagicFile /usr/share/magic.mime
430
+ MIMEMagicFile conf/magic
431
+ </IfModule>
432
+
433
+ #
434
+ # HostnameLookups: Log the names of clients or just their IP addresses
435
+ # e.g., www.apache.org (on) or 204.62.129.132 (off).
436
+ # The default is off because it'd be overall better for the net if people
437
+ # had to knowingly turn this feature on, since enabling it means that
438
+ # each client request will result in AT LEAST one lookup request to the
439
+ # nameserver.
440
+ #
441
+ HostnameLookups Off
442
+
443
+ #
444
+ # EnableMMAP: Control whether memory-mapping is used to deliver
445
+ # files (assuming that the underlying OS supports it).
446
+ # The default is on; turn this off if you serve from NFS-mounted
447
+ # filesystems. On some systems, turning it off (regardless of
448
+ # filesystem) can improve performance; for details, please see
449
+ # http://httpd.apache.org/docs/2.2/mod/core.html#enablemmap
450
+ #
451
+ #EnableMMAP off
452
+
453
+ #
454
+ # EnableSendfile: Control whether the sendfile kernel support is
455
+ # used to deliver files (assuming that the OS supports it).
456
+ # The default is on; turn this off if you serve from NFS-mounted
457
+ # filesystems. Please see
458
+ # http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile
459
+ #
460
+ #EnableSendfile off
461
+
462
+ #
463
+ # ErrorLog: The location of the error log file.
464
+ # If you do not specify an ErrorLog directive within a <VirtualHost>
465
+ # container, error messages relating to that virtual host will be
466
+ # logged here. If you *do* define an error logfile for a <VirtualHost>
467
+ # container, that host's errors will be logged there and not here.
468
+ #
469
+ ErrorLog logs/error_log
470
+
471
+ #
472
+ # LogLevel: Control the number of messages logged to the error_log.
473
+ # Possible values include: debug, info, notice, warn, error, crit,
474
+ # alert, emerg.
475
+ #
476
+ LogLevel warn
477
+
478
+ #
479
+ # The following directives define some format nicknames for use with
480
+ # a CustomLog directive (see below).
481
+ #
482
+ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
483
+ LogFormat "%h %l %u %t \"%r\" %>s %b" common
484
+ LogFormat "%{Referer}i -> %U" referer
485
+ LogFormat "%{User-agent}i" agent
486
+
487
+ # "combinedio" includes actual counts of actual bytes received (%I) and sent (%O); this
488
+ # requires the mod_logio module to be loaded.
489
+ #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
490
+
491
+ #
492
+ # The location and format of the access logfile (Common Logfile Format).
493
+ # If you do not define any access logfiles within a <VirtualHost>
494
+ # container, they will be logged here. Contrariwise, if you *do*
495
+ # define per-<VirtualHost> access logfiles, transactions will be
496
+ # logged therein and *not* in this file.
497
+ #
498
+ #CustomLog logs/access_log common
499
+
500
+ #
501
+ # If you would like to have separate agent and referer logfiles, uncomment
502
+ # the following directives.
503
+ #
504
+ #CustomLog logs/referer_log referer
505
+ #CustomLog logs/agent_log agent
506
+
507
+ #
508
+ # For a single logfile with access, agent, and referer information
509
+ # (Combined Logfile Format), use the following directive:
510
+ #
511
+ CustomLog logs/access_log combined
512
+
513
+ #
514
+ # Optionally add a line containing the server version and virtual host
515
+ # name to server-generated pages (internal error documents, FTP directory
516
+ # listings, mod_status and mod_info output etc., but not CGI generated
517
+ # documents or custom error documents).
518
+ # Set to "EMail" to also include a mailto: link to the ServerAdmin.
519
+ # Set to one of: On | Off | EMail
520
+ #
521
+ ServerSignature On
522
+
523
+ #
524
+ # Aliases: Add here as many aliases as you need (with no limit). The format is
525
+ # Alias fakename realname
526
+ #
527
+ # Note that if you include a trailing / on fakename then the server will
528
+ # require it to be present in the URL. So "/icons" isn't aliased in this
529
+ # example, only "/icons/". If the fakename is slash-terminated, then the
530
+ # realname must also be slash terminated, and if the fakename omits the
531
+ # trailing slash, the realname must also omit it.
532
+ #
533
+ # We include the /icons/ alias for FancyIndexed directory listings. If you
534
+ # do not use FancyIndexing, you may comment this out.
535
+ #
536
+ Alias /icons/ "/var/www/icons/"
537
+
538
+ <Directory "/var/www/icons">
539
+ Options Indexes MultiViews FollowSymLinks
540
+ AllowOverride None
541
+ Order allow,deny
542
+ Allow from all
543
+ </Directory>
544
+
545
+ #
546
+ # WebDAV module configuration section.
547
+ #
548
+ <IfModule mod_dav_fs.c>
549
+ # Location of the WebDAV lock database.
550
+ DAVLockDB /var/lib/dav/lockdb
551
+ </IfModule>
552
+
553
+ #
554
+ # ScriptAlias: This controls which directories contain server scripts.
555
+ # ScriptAliases are essentially the same as Aliases, except that
556
+ # documents in the realname directory are treated as applications and
557
+ # run by the server when requested rather than as documents sent to the client.
558
+ # The same rules about trailing "/" apply to ScriptAlias directives as to
559
+ # Alias.
560
+ #
561
+ ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
562
+
563
+ #
564
+ # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
565
+ # CGI directory exists, if you have that configured.
566
+ #
567
+ <Directory "/var/www/cgi-bin">
568
+ AllowOverride None
569
+ Options None
570
+ Order allow,deny
571
+ Allow from all
572
+ </Directory>
573
+
574
+ #
575
+ # Redirect allows you to tell clients about documents which used to exist in
576
+ # your server's namespace, but do not anymore. This allows you to tell the
577
+ # clients where to look for the relocated document.
578
+ # Example:
579
+ # Redirect permanent /foo http://www.example.com/bar
580
+
581
+ #
582
+ # Directives controlling the display of server-generated directory listings.
583
+ #
584
+
585
+ #
586
+ # IndexOptions: Controls the appearance of server-generated directory
587
+ # listings.
588
+ #
589
+ IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8
590
+
591
+ #
592
+ # AddIcon* directives tell the server which icon to show for different
593
+ # files or filename extensions. These are only displayed for
594
+ # FancyIndexed directories.
595
+ #
596
+ AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
597
+
598
+ AddIconByType (TXT,/icons/text.gif) text/*
599
+ AddIconByType (IMG,/icons/image2.gif) image/*
600
+ AddIconByType (SND,/icons/sound2.gif) audio/*
601
+ AddIconByType (VID,/icons/movie.gif) video/*
602
+
603
+ AddIcon /icons/binary.gif .bin .exe
604
+ AddIcon /icons/binhex.gif .hqx
605
+ AddIcon /icons/tar.gif .tar
606
+ AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
607
+ AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
608
+ AddIcon /icons/a.gif .ps .ai .eps
609
+ AddIcon /icons/layout.gif .html .shtml .htm .pdf
610
+ AddIcon /icons/text.gif .txt
611
+ AddIcon /icons/c.gif .c
612
+ AddIcon /icons/p.gif .pl .py
613
+ AddIcon /icons/f.gif .for
614
+ AddIcon /icons/dvi.gif .dvi
615
+ AddIcon /icons/uuencoded.gif .uu
616
+ AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
617
+ AddIcon /icons/tex.gif .tex
618
+ AddIcon /icons/bomb.gif core
619
+
620
+ AddIcon /icons/back.gif ..
621
+ AddIcon /icons/hand.right.gif README
622
+ AddIcon /icons/folder.gif ^^DIRECTORY^^
623
+ AddIcon /icons/blank.gif ^^BLANKICON^^
624
+
625
+ #
626
+ # DefaultIcon is which icon to show for files which do not have an icon
627
+ # explicitly set.
628
+ #
629
+ DefaultIcon /icons/unknown.gif
630
+
631
+ #
632
+ # AddDescription allows you to place a short description after a file in
633
+ # server-generated indexes. These are only displayed for FancyIndexed
634
+ # directories.
635
+ # Format: AddDescription "description" filename
636
+ #
637
+ #AddDescription "GZIP compressed document" .gz
638
+ #AddDescription "tar archive" .tar
639
+ #AddDescription "GZIP compressed tar archive" .tgz
640
+
641
+ #
642
+ # ReadmeName is the name of the README file the server will look for by
643
+ # default, and append to directory listings.
644
+ #
645
+ # HeaderName is the name of a file which should be prepended to
646
+ # directory indexes.
647
+ ReadmeName README.html
648
+ HeaderName HEADER.html
649
+
650
+ #
651
+ # IndexIgnore is a set of filenames which directory indexing should ignore
652
+ # and not include in the listing. Shell-style wildcarding is permitted.
653
+ #
654
+ IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
655
+
656
+ #
657
+ # DefaultLanguage and AddLanguage allows you to specify the language of
658
+ # a document. You can then use content negotiation to give a browser a
659
+ # file in a language the user can understand.
660
+ #
661
+ # Specify a default language. This means that all data
662
+ # going out without a specific language tag (see below) will
663
+ # be marked with this one. You probably do NOT want to set
664
+ # this unless you are sure it is correct for all cases.
665
+ #
666
+ # * It is generally better to not mark a page as
667
+ # * being a certain language than marking it with the wrong
668
+ # * language!
669
+ #
670
+ # DefaultLanguage nl
671
+ #
672
+ # Note 1: The suffix does not have to be the same as the language
673
+ # keyword --- those with documents in Polish (whose net-standard
674
+ # language code is pl) may wish to use "AddLanguage pl .po" to
675
+ # avoid the ambiguity with the common suffix for perl scripts.
676
+ #
677
+ # Note 2: The example entries below illustrate that in some cases
678
+ # the two character 'Language' abbreviation is not identical to
679
+ # the two character 'Country' code for its country,
680
+ # E.g. 'Danmark/dk' versus 'Danish/da'.
681
+ #
682
+ # Note 3: In the case of 'ltz' we violate the RFC by using a three char
683
+ # specifier. There is 'work in progress' to fix this and get
684
+ # the reference data for rfc1766 cleaned up.
685
+ #
686
+ # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
687
+ # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
688
+ # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
689
+ # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
690
+ # Norwegian (no) - Polish (pl) - Portugese (pt)
691
+ # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
692
+ # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
693
+ #
694
+ AddLanguage ca .ca
695
+ AddLanguage cs .cz .cs
696
+ AddLanguage da .dk
697
+ AddLanguage de .de
698
+ AddLanguage el .el
699
+ AddLanguage en .en
700
+ AddLanguage eo .eo
701
+ AddLanguage es .es
702
+ AddLanguage et .et
703
+ AddLanguage fr .fr
704
+ AddLanguage he .he
705
+ AddLanguage hr .hr
706
+ AddLanguage it .it
707
+ AddLanguage ja .ja
708
+ AddLanguage ko .ko
709
+ AddLanguage ltz .ltz
710
+ AddLanguage nl .nl
711
+ AddLanguage nn .nn
712
+ AddLanguage no .no
713
+ AddLanguage pl .po
714
+ AddLanguage pt .pt
715
+ AddLanguage pt-BR .pt-br
716
+ AddLanguage ru .ru
717
+ AddLanguage sv .sv
718
+ AddLanguage zh-CN .zh-cn
719
+ AddLanguage zh-TW .zh-tw
720
+
721
+ #
722
+ # LanguagePriority allows you to give precedence to some languages
723
+ # in case of a tie during content negotiation.
724
+ #
725
+ # Just list the languages in decreasing order of preference. We have
726
+ # more or less alphabetized them here. You probably want to change this.
727
+ #
728
+ LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
729
+
730
+ #
731
+ # ForceLanguagePriority allows you to serve a result page rather than
732
+ # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
733
+ # [in case no accepted languages matched the available variants]
734
+ #
735
+ ForceLanguagePriority Prefer Fallback
736
+
737
+ #
738
+ # Specify a default charset for all content served; this enables
739
+ # interpretation of all content as UTF-8 by default. To use the
740
+ # default browser choice (ISO-8859-1), or to allow the META tags
741
+ # in HTML content to override this choice, comment out this
742
+ # directive:
743
+ #
744
+ AddDefaultCharset UTF-8
745
+
746
+ #
747
+ # AddType allows you to add to or override the MIME configuration
748
+ # file mime.types for specific file types.
749
+ #
750
+ #AddType application/x-tar .tgz
751
+
752
+ #
753
+ # AddEncoding allows you to have certain browsers uncompress
754
+ # information on the fly. Note: Not all browsers support this.
755
+ # Despite the name similarity, the following Add* directives have nothing
756
+ # to do with the FancyIndexing customization directives above.
757
+ #
758
+ #AddEncoding x-compress .Z
759
+ #AddEncoding x-gzip .gz .tgz
760
+
761
+ # If the AddEncoding directives above are commented-out, then you
762
+ # probably should define those extensions to indicate media types:
763
+ #
764
+ AddType application/x-compress .Z
765
+ AddType application/x-gzip .gz .tgz
766
+
767
+ #
768
+ # MIME-types for downloading Certificates and CRLs
769
+ #
770
+ AddType application/x-x509-ca-cert .crt
771
+ AddType application/x-pkcs7-crl .crl
772
+
773
+ #
774
+ # AddHandler allows you to map certain file extensions to "handlers":
775
+ # actions unrelated to filetype. These can be either built into the server
776
+ # or added with the Action directive (see below)
777
+ #
778
+ # To use CGI scripts outside of ScriptAliased directories:
779
+ # (You will also need to add "ExecCGI" to the "Options" directive.)
780
+ #
781
+ #AddHandler cgi-script .cgi
782
+
783
+ #
784
+ # For files that include their own HTTP headers:
785
+ #
786
+ #AddHandler send-as-is asis
787
+
788
+ #
789
+ # For type maps (negotiated resources):
790
+ # (This is enabled by default to allow the Apache "It Worked" page
791
+ # to be distributed in multiple languages.)
792
+ #
793
+ AddHandler type-map var
794
+
795
+ #
796
+ # Filters allow you to process content before it is sent to the client.
797
+ #
798
+ # To parse .shtml files for server-side includes (SSI):
799
+ # (You will also need to add "Includes" to the "Options" directive.)
800
+ #
801
+ AddType text/html .shtml
802
+ AddOutputFilter INCLUDES .shtml
803
+
804
+ #
805
+ # Action lets you define media types that will execute a script whenever
806
+ # a matching file is called. This eliminates the need for repeated URL
807
+ # pathnames for oft-used CGI file processors.
808
+ # Format: Action media/type /cgi-script/location
809
+ # Format: Action handler-name /cgi-script/location
810
+ #
811
+
812
+ #
813
+ # Customizable error responses come in three flavors:
814
+ # 1) plain text 2) local redirects 3) external redirects
815
+ #
816
+ # Some examples:
817
+ #ErrorDocument 500 "The server made a boo boo."
818
+ #ErrorDocument 404 /missing.html
819
+ #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
820
+ #ErrorDocument 402 http://www.example.com/subscription_info.html
821
+ #
822
+
823
+ #
824
+ # Putting this all together, we can internationalize error responses.
825
+ #
826
+ # We use Alias to redirect any /error/HTTP_<error>.html.var response to
827
+ # our collection of by-error message multi-language collections. We use
828
+ # includes to substitute the appropriate text.
829
+ #
830
+ # You can modify the messages' appearance without changing any of the
831
+ # default HTTP_<error>.html.var files by adding the line:
832
+ #
833
+ # Alias /error/include/ "/your/include/path/"
834
+ #
835
+ # which allows you to create your own set of files by starting with the
836
+ # /var/www/error/include/ files and
837
+ # copying them to /your/include/path/, even on a per-VirtualHost basis.
838
+ #
839
+
840
+ Alias /error/ "/var/www/error/"
841
+
842
+ <IfModule mod_negotiation.c>
843
+ <IfModule mod_include.c>
844
+ <Directory "/var/www/error">
845
+ AllowOverride None
846
+ Options IncludesNoExec
847
+ AddOutputFilter Includes html
848
+ AddHandler type-map var
849
+ Order allow,deny
850
+ Allow from all
851
+ LanguagePriority en es de fr
852
+ ForceLanguagePriority Prefer Fallback
853
+ </Directory>
854
+
855
+ # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
856
+ # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
857
+ # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
858
+ # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
859
+ # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
860
+ # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
861
+ # ErrorDocument 410 /error/HTTP_GONE.html.var
862
+ # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
863
+ # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
864
+ # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
865
+ # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
866
+ # ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
867
+ # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
868
+ # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
869
+ # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
870
+ # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
871
+ # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
872
+
873
+ </IfModule>
874
+ </IfModule>
875
+
876
+ #
877
+ # The following directives modify normal HTTP response behavior to
878
+ # handle known problems with browser implementations.
879
+ #
880
+ BrowserMatch "Mozilla/2" nokeepalive
881
+ BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
882
+ BrowserMatch "RealPlayer 4\.0" force-response-1.0
883
+ BrowserMatch "Java/1\.0" force-response-1.0
884
+ BrowserMatch "JDK/1\.0" force-response-1.0
885
+
886
+ #
887
+ # The following directive disables redirects on non-GET requests for
888
+ # a directory that does not include the trailing slash. This fixes a
889
+ # problem with Microsoft WebFolders which does not appropriately handle
890
+ # redirects for folders with DAV methods.
891
+ # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
892
+ #
893
+ BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
894
+ BrowserMatch "MS FrontPage" redirect-carefully
895
+ BrowserMatch "^WebDrive" redirect-carefully
896
+ BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
897
+ BrowserMatch "^gnome-vfs/1.0" redirect-carefully
898
+ BrowserMatch "^XML Spy" redirect-carefully
899
+ BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
900
+
901
+ #
902
+ # Allow server status reports generated by mod_status,
903
+ # with the URL of http://servername/server-status
904
+ # Change the ".example.com" to match your domain to enable.
905
+ #
906
+ #<Location /server-status>
907
+ # SetHandler server-status
908
+ # Order deny,allow
909
+ # Deny from all
910
+ # Allow from .example.com
911
+ #</Location>
912
+
913
+ #
914
+ # Allow remote server configuration reports, with the URL of
915
+ # http://servername/server-info (requires that mod_info.c be loaded).
916
+ # Change the ".example.com" to match your domain to enable.
917
+ #
918
+ #<Location /server-info>
919
+ # SetHandler server-info
920
+ # Order deny,allow
921
+ # Deny from all
922
+ # Allow from .example.com
923
+ #</Location>
924
+
925
+ #
926
+ # Proxy Server directives. Uncomment the following lines to
927
+ # enable the proxy server:
928
+ #
929
+ #<IfModule mod_proxy.c>
930
+ #ProxyRequests On
931
+ #
932
+ #<Proxy *>
933
+ # Order deny,allow
934
+ # Deny from all
935
+ # Allow from .example.com
936
+ #</Proxy>
937
+
938
+ #
939
+ # Enable/disable the handling of HTTP/1.1 "Via:" headers.
940
+ # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
941
+ # Set to one of: Off | On | Full | Block
942
+ #
943
+ #ProxyVia On
944
+
945
+ #
946
+ # To enable a cache of proxied content, uncomment the following lines.
947
+ # See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
948
+ #
949
+ #<IfModule mod_disk_cache.c>
950
+ # CacheEnable disk /
951
+ # CacheRoot "/var/cache/mod_proxy"
952
+ #</IfModule>
953
+ #
954
+
955
+ #</IfModule>
956
+ # End of proxy directives.
957
+
958
+ ### Section 3: Virtual Hosts
959
+ #
960
+ # VirtualHost: If you want to maintain multiple domains/hostnames on your
961
+ # machine you can setup VirtualHost containers for them. Most configurations
962
+ # use only name-based virtual hosts so the server doesn't need to worry about
963
+ # IP addresses. This is indicated by the asterisks in the directives below.
964
+ #
965
+ # Please see the documentation at
966
+ # <URL:http://httpd.apache.org/docs/2.2/vhosts/>
967
+ # for further details before you try to setup virtual hosts.
968
+ #
969
+ # You may use the command line option '-S' to verify your virtual host
970
+ # configuration.
971
+
972
+ #
973
+ # Use name-based virtual hosting.
974
+ #
975
+ #NameVirtualHost *:80
976
+ #
977
+ # NOTE: NameVirtualHost cannot be used without a port specifier
978
+ # (e.g. :80) if mod_ssl is being used, due to the nature of the
979
+ # SSL protocol.
980
+ #
981
+
982
+ #
983
+ # VirtualHost example:
984
+ # Almost any Apache directive may go into a VirtualHost container.
985
+ # The first VirtualHost section is used for requests without a known
986
+ # server name.
987
+ #
988
+ #<VirtualHost *:80>
989
+ # ServerAdmin webmaster@dummy-host.example.com
990
+ # DocumentRoot /www/docs/dummy-host.example.com
991
+ # ServerName dummy-host.example.com
992
+ # ErrorLog logs/dummy-host.example.com-error_log
993
+ # CustomLog logs/dummy-host.example.com-access_log common
994
+ #</VirtualHost>
995
+
996
+ # Include all vhost defintions in vhost.d
997
+ Include vhost.d/*.vhost