├── group_vars
├── all
└── moosefs_all
├── roles
├── moosefs_master
│ ├── handlers
│ │ └── main.yml
│ ├── templates
│ │ ├── mfsmetalogger.cfg.j2
│ │ ├── mfsmaster.cfg.j2
│ │ ├── mfsexports.cfg.j2
│ │ └── httpd.conf.j2
│ ├── files
│ │ └── index.html
│ └── tasks
│ │ └── main.yml
├── moosefs_metalogger
│ ├── handlers
│ │ └── main.yml
│ ├── tasks
│ │ └── main.yml
│ └── templates
│ │ └── mfsmetalogger.cfg.j2
├── common
│ └── tasks
│ │ └── main.yml
├── moosefs_chunkserver
│ ├── handlers
│ │ └── main.yml
│ ├── templates
│ │ ├── mfshdd.cfg.j2
│ │ └── mfschunkserver.cfg.j2
│ └── tasks
│ │ └── main.yml
├── moosefs_common
│ └── tasks
│ │ └── main.yml
└── moosefs_client
│ └── tasks
│ └── main.yml
├── site.yml
├── tools
├── tips.txt
├── tree.txt
└── output.log
├── moosefs.yml
└── moosefs.hosts
/group_vars/all:
--------------------------------------------------------------------------------
1 | ansible: demoenv-master
2 |
--------------------------------------------------------------------------------
/roles/moosefs_master/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart httpd
2 | service: name=httpd state=restarted
3 |
--------------------------------------------------------------------------------
/roles/moosefs_metalogger/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart mfsmetalogger
2 | service: name=mfsmetalogger state=restarted
3 |
--------------------------------------------------------------------------------
/roles/common/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: create adm users
2 | user: name={{ item }} group=adm
3 | with_items:
4 | - dong.guo
5 |
--------------------------------------------------------------------------------
/roles/moosefs_chunkserver/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart mfschunkserver
2 | service: name=mfschunkserver state=restarted
3 |
--------------------------------------------------------------------------------
/site.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # The main playbook to deploy the site
3 |
4 | - hosts: all
5 | roles:
6 | - common
7 |
8 | - include: moosefs.yml
9 |
--------------------------------------------------------------------------------
/roles/moosefs_chunkserver/templates/mfshdd.cfg.j2:
--------------------------------------------------------------------------------
1 | # mount points of HDD drives
2 | {% for mfschunks in moosefs['mfshdd'] %}
3 | {{mfschunks}}
4 | {% endfor %}
5 |
--------------------------------------------------------------------------------
/group_vars/moosefs_all:
--------------------------------------------------------------------------------
1 | moosefs:
2 | master: 'demoenv-master'
3 | httpd_port: 9480
4 | mfshdd:
5 | - /mnt/mfschunks1
6 | - /mnt/mfschunks2
7 | mfsmount:
8 | - /mnt/mfsmount
9 |
--------------------------------------------------------------------------------
/tools/tips.txt:
--------------------------------------------------------------------------------
1 | # /etc/ansible/ansible.cfg
2 | # uncomment this to disable SSH key host checking
3 | host_key_checking = False
4 |
5 | # run ansbile playbook
6 | ansible-playbook -i moosefs.hosts site.yml -u dong.guo --sudo
7 |
--------------------------------------------------------------------------------
/roles/moosefs_common/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: create rpmforge repo
2 | command: creates=/etc/yum.repos.d/rpmforge.repo rpm -i http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
3 |
4 | - name: install mfs common packages
5 | yum: name=mfs state=installed
6 |
--------------------------------------------------------------------------------
/roles/moosefs_metalogger/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # mfsmetalogger
2 | - name: copy the mfsmetalogger configurations
3 | template: src={{ item }}.j2 dest=/etc/mfs/{{ item }} owner=root group=root mode=0644
4 | with_items:
5 | - mfsmetalogger.cfg
6 | notify: restart mfsmetalogger
7 |
8 | - name: start mfsmetalogger service
9 | service: name=mfsmetalogger state=started
10 |
--------------------------------------------------------------------------------
/moosefs.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # Main Play moosefs deployment playbook
3 |
4 | - hosts: moosefs_all
5 | roles:
6 | - role: moosefs_common
7 |
8 | - hosts: moosefs_master
9 | roles:
10 | - role: moosefs_master
11 |
12 | - hosts: moosefs_datanode
13 | roles:
14 | - role: moosefs_chunkserver
15 |
16 | - hosts: moosefs_backup
17 | roles:
18 | - role: moosefs_metalogger
19 | - role: moosefs_client
20 |
--------------------------------------------------------------------------------
/moosefs.hosts:
--------------------------------------------------------------------------------
1 | # The Inventory of moosefs Hosts
2 |
3 | # All moosefs groups
4 | [moosefs_all:children]
5 | moosefs_master
6 | moosefs_backup
7 | moosefs_datanode
8 |
9 | # Group of moosefs master
10 | [moosefs_master]
11 | demoenv-master
12 |
13 | # Group of moosefs backup server
14 | [moosefs_backup]
15 | demoenv-secondary
16 |
17 | # Group of moosefs datanode servers
18 | [moosefs_datanode]
19 | demoenv-node-[1:3]
20 |
--------------------------------------------------------------------------------
/roles/moosefs_client/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #mfsclient
2 | - name: install mfs client package
3 | yum: name=mfs-client state=installed
4 |
5 | - name: create mfsclient mountpoint directory
6 | file: path={{ item }} owner=daemon group=daemon state=directory mode=0755
7 | with_items: moosefs.mfsmount
8 |
9 | - name: mount moosefs
10 | raw: test -e {{ item }}/.mounted || mfsmount {{ item }} -H ${moosefs.master} && touch {{ item }}/.mounted
11 | with_items: moosefs.mfsmount
12 |
--------------------------------------------------------------------------------
/roles/moosefs_chunkserver/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #mfschunkserver
2 | - name: copy the mfschunkserver configurations
3 | template: src={{ item }}.j2 dest=/etc/mfs/{{ item }} owner=root group=root mode=0644
4 | with_items:
5 | - mfschunkserver.cfg
6 | - mfshdd.cfg
7 | notify: restart mfschunkserver
8 |
9 | - name: create mfshdd directories
10 | file: path={{ item }} owner=daemon group=daemon state=directory mode=0755
11 | with_items: moosefs.mfshdd
12 |
13 | - name: start mfschunkserver service
14 | service: name=mfschunkserver state=started
15 |
--------------------------------------------------------------------------------
/roles/moosefs_master/templates/mfsmetalogger.cfg.j2:
--------------------------------------------------------------------------------
1 | # WORKING_USER = daemon
2 | # WORKING_GROUP = daemon
3 | # SYSLOG_IDENT = mfsmetalogger
4 | # LOCK_MEMORY = 0
5 | # NICE_LEVEL = -19
6 |
7 | # DATA_PATH = /var/mfs
8 |
9 | # BACK_LOGS = 50
10 | # BACK_META_KEEP_PREVIOUS = 3
11 | # META_DOWNLOAD_FREQ = 24
12 |
13 | # MASTER_RECONNECTION_DELAY = 5
14 |
15 | # MASTER_HOST = mfsmaster
16 | MASTER_HOST = {{ moosefs['master'] }}
17 | # MASTER_PORT = 9419
18 |
19 | # MASTER_TIMEOUT = 60
20 |
21 | # deprecated, to be removed in MooseFS 1.7
22 | # LOCK_FILE = /var/run/mfs/mfsmetalogger.lock
23 |
--------------------------------------------------------------------------------
/roles/moosefs_metalogger/templates/mfsmetalogger.cfg.j2:
--------------------------------------------------------------------------------
1 | # WORKING_USER = daemon
2 | # WORKING_GROUP = daemon
3 | # SYSLOG_IDENT = mfsmetalogger
4 | # LOCK_MEMORY = 0
5 | # NICE_LEVEL = -19
6 |
7 | # DATA_PATH = /var/mfs
8 |
9 | # BACK_LOGS = 50
10 | # BACK_META_KEEP_PREVIOUS = 3
11 | # META_DOWNLOAD_FREQ = 24
12 |
13 | # MASTER_RECONNECTION_DELAY = 5
14 |
15 | # MASTER_HOST = mfsmaster
16 | MASTER_HOST = {{ moosefs['master'] }}
17 | # MASTER_PORT = 9419
18 |
19 | # MASTER_TIMEOUT = 60
20 |
21 | # deprecated, to be removed in MooseFS 1.7
22 | # LOCK_FILE = /var/run/mfs/mfsmetalogger.lock
23 |
--------------------------------------------------------------------------------
/roles/moosefs_master/files/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | MFS
6 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/roles/moosefs_chunkserver/templates/mfschunkserver.cfg.j2:
--------------------------------------------------------------------------------
1 | # WORKING_USER = daemon
2 | # WORKING_GROUP = daemon
3 | # SYSLOG_IDENT = mfschunkserver
4 | # LOCK_MEMORY = 0
5 | # NICE_LEVEL = -19
6 |
7 | # DATA_PATH = /var/mfs
8 |
9 | # MASTER_RECONNECTION_DELAY = 5
10 |
11 | # BIND_HOST = *
12 | # MASTER_HOST = mfsmaster
13 | MASTER_HOST = {{ moosefs['master'] }}
14 | # MASTER_PORT = 9420
15 |
16 | # MASTER_TIMEOUT = 60
17 |
18 | # CSSERV_LISTEN_HOST = *
19 | # CSSERV_LISTEN_PORT = 9422
20 |
21 | # HDD_CONF_FILENAME = /etc/mfs/mfshdd.cfg
22 | # HDD_TEST_FREQ = 10
23 |
24 | # deprecated, to be removed in MooseFS 1.7
25 | # LOCK_FILE = /var/run/mfs/mfschunkserver.lock
26 | # BACK_LOGS = 50
27 | # CSSERV_TIMEOUT = 5
28 |
--------------------------------------------------------------------------------
/roles/moosefs_master/templates/mfsmaster.cfg.j2:
--------------------------------------------------------------------------------
1 | # WORKING_USER = daemon
2 | # WORKING_GROUP = daemon
3 | # SYSLOG_IDENT = mfsmaster
4 | # LOCK_MEMORY = 0
5 | # NICE_LEVEL = -19
6 |
7 | # EXPORTS_FILENAME = /etc/mfs/mfsexports.cfg
8 |
9 | # TOPOLOGY_FILENAME = /etc/mfs/mfstopology.cfg
10 |
11 | # DATA_PATH = /var/mfs
12 |
13 | # BACK_LOGS = 50
14 | # BACK_META_KEEP_PREVIOUS = 1
15 |
16 | # REPLICATIONS_DELAY_INIT = 300
17 | # REPLICATIONS_DELAY_DISCONNECT = 3600
18 |
19 | # MATOML_LISTEN_HOST = *
20 | # MATOML_LISTEN_PORT = 9419
21 |
22 | # MATOCS_LISTEN_HOST = *
23 | # MATOCS_LISTEN_PORT = 9420
24 |
25 | # MATOCL_LISTEN_HOST = *
26 | # MATOCL_LISTEN_PORT = 9421
27 |
28 | # CHUNKS_LOOP_CPS = 100000
29 | # CHUNKS_LOOP_TIME = 300
30 |
31 | # CHUNKS_SOFT_DEL_LIMIT = 10
32 | # CHUNKS_HARD_DEL_LIMIT = 25
33 | # CHUNKS_WRITE_REP_LIMIT = 2
34 | # CHUNKS_READ_REP_LIMIT = 10
35 |
36 | # REJECT_OLD_CLIENTS = 0
37 |
38 | # deprecated:
39 | # CHUNKS_DEL_LIMIT - use CHUNKS_SOFT_DEL_LIMIT instead
40 | # LOCK_FILE - lock system has been changed, and this option is used only to search for old lockfile
41 |
--------------------------------------------------------------------------------
/roles/moosefs_master/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # mfsmaster
2 | - name: copy the mfsmaster configurations
3 | template: src={{ item }}.j2 dest=/etc/mfs/{{ item }} owner=root group=root mode=0644
4 | with_items:
5 | - mfsmaster.cfg
6 | - mfsexports.cfg
7 | - mfsmetalogger.cfg
8 |
9 | - name: create metadata.mfs
10 | command: creates=metadata.mfs.back chdir=/var/mfs/ cp metadata.mfs.empty metadata.mfs
11 |
12 | - name: chown /var/mfs to daemon.daemon
13 | file: path=/var/mfs owner=daemon group=daemon state=directory recurse=yes
14 |
15 | - name: start mfsmaster service
16 | service: name=mfsmaster state=started
17 |
18 | # httpd
19 | - name: install httpd package
20 | yum: name=httpd state=installed
21 |
22 | - name: copy the httpd configuration
23 | template: src=httpd.conf.j2 dest=/etc/httpd/conf/httpd.conf owner=root group=root mode=0644
24 | notify: restart httpd
25 |
26 | - name: install mfs-cgi package
27 | yum: name=mfs-cgi state=installed
28 |
29 | - name: copy the index.html
30 | copy: src=index.html dest=/var/www/html/mfs/index.html
31 |
32 | - name: start httpd service
33 | service: name=httpd state=started
34 |
--------------------------------------------------------------------------------
/tools/tree.txt:
--------------------------------------------------------------------------------
1 | .
2 | |-- group_vars
3 | | |-- all
4 | | `-- moosefs_all
5 | |-- moosefs.hosts
6 | |-- moosefs.yml
7 | |-- roles
8 | | |-- common
9 | | | `-- tasks
10 | | | `-- main.yml
11 | | |-- moosefs_chunkserver
12 | | | |-- handlers
13 | | | | `-- main.yml
14 | | | |-- tasks
15 | | | | `-- main.yml
16 | | | `-- templates
17 | | | |-- mfschunkserver.cfg.j2
18 | | | `-- mfshdd.cfg.j2
19 | | |-- moosefs_client
20 | | | `-- tasks
21 | | | `-- main.yml
22 | | |-- moosefs_common
23 | | | `-- tasks
24 | | | `-- main.yml
25 | | |-- moosefs_master
26 | | | |-- files
27 | | | | `-- index.html
28 | | | |-- handlers
29 | | | | `-- main.yml
30 | | | |-- tasks
31 | | | | `-- main.yml
32 | | | `-- templates
33 | | | |-- httpd.conf.j2
34 | | | |-- mfsexports.cfg.j2
35 | | | |-- mfsmaster.cfg.j2
36 | | | `-- mfsmetalogger.cfg.j2
37 | | `-- moosefs_metalogger
38 | | |-- handlers
39 | | | `-- main.yml
40 | | |-- tasks
41 | | | `-- main.yml
42 | | `-- templates
43 | | `-- mfsmetalogger.cfg.j2
44 | `-- site.yml
45 |
--------------------------------------------------------------------------------
/roles/moosefs_master/templates/mfsexports.cfg.j2:
--------------------------------------------------------------------------------
1 | # Allow everything but "meta".
2 | * / rw,alldirs,maproot=0
3 |
4 | # Allow "meta".
5 | * . rw
6 |
7 | # Line format:
8 | # [ip range] [path] [options]
9 | # ip range:
10 | # * = any ip (same as 0.0.0.0/0)
11 | # A.B.C.D = given ip address
12 | # A.B.C.D-E.F.G.H = range of ip addresses
13 | # A.B.C.D/BITS = A.B.C.D network with BITS ones in netmask
14 | # A.B.C.D/E.F.G.H = A.B.C.D network with E.F.G.H netmask
15 | # path:
16 | # . = special 'path' that means 'meta'
17 | # /... = path in mfs structure
18 | # options:
19 | # ro/rw/readonly/readwrite = meaning is obvious
20 | # alldirs = any subdirectored can be mounted as root
21 | # dynamicip = ip is tested only during first authentication, then client can use the same session id from any ip
22 | # ignoregid = group id (gid) is not tested - important when you want to use auxilinary groups
23 | # canchangequota = manipulating quota values is allowed (quota is already implemented but will be enabled in version 1.7)
24 | # maproot=UID[:GID] = treat all root (user with uid equal to zero) operations as operations done by user with uid equal to UID and gid equal to GID (or default gid of this user)
25 | # mapall=UID[:GID} = like above but for all operations (for both options UID and/or GID can be specified as username or groupname existing on master machine)
26 | # password=TEXT = force authentication using given password
27 | # md5pass=MD5 = like above, but with password defined as it's MD5 hash (MD5 specified as 128-bit hexadecimal number)
28 | # minversion=VERS = allow only clients with version number equal or greater than VERS (VERS can be specified as X or X.Y or X.Y.Z)
29 | # mingoal=N = do not allow to set goal below N (N should be a digit from '1' to '9')
30 | # maxgoal=N = do not allow to set goal above N (N as above)
31 | # mintrashtime=TIMEDURATION = do not allow to set trashtime below TIMEDURATION (TIMEDURATION can be specified as number of seconds or combination of elements #W,#D,#H,#M,#S with given order)
32 | # maxtrashtime=TIMEDURATION = do not allow to set trashtime above TIMEDURATION (TIMEDURATION can be specified as above)
33 | #
34 | # Defaults:
35 | # readonly,maproot=999:999,mingoal=1,maxgoal=9,mintrashtime=0,maxtrashtime=4294967295
36 | #
37 | # TIMEDURATION examples:
38 | # 2H = 2 hours
39 | # 4h30M = 4 hours and 30 minutes (time units are case insensitive)
40 | # 12w = 12 weeks
41 | # 86400 = 86400 seconds = 1 day
42 | # 11d13h46m40s = 1000000 seconds (defined in a little strage way as 11 days, 13 hours, 46 minutes and 40 seconds)
43 | # 48H = 48 hours = 2 days (it is allowed to use any positive number with any time unit as long as calculated number of seconds do not overrun 4294967295)
44 | # 30m12h = wrong definition (minutes before hours)
45 | # 30m12 = wrong definition (12 without unit definition - only one, alone number is allowed without unit definition)
46 | # 50000d = wrong definition (calculated number of seconds is 4320000000 which is greater than 4294967295)
47 |
48 | # Some examples:
49 |
50 | # Users from any IP can mount root directory as a read-only file system. Local roots are mapped as users with uid:gid = 999:999.
51 | #* / ro
52 |
53 | # Users from IP 192.168.1.0-192.168.1.255 can mount root directory as a standard read/write file system. Local roots are mapped as users with uid:gid = 999:999.
54 | #192.168.1.0/24 / rw
55 |
56 | # Users from IP 192.168.1.0-192.168.1.255 when give password 'passcode' can mount any subdirectory as a standard read/write file system. Local roots are left unmapped.
57 | #192.168.1.0/24 / rw,alldirs,maproot=0,password=passcode
58 |
59 | # Users from IP 10.0.0.0-10.0.0.5 when give password 'test' can mount 'test' subdirectory as a standard read/write file system. Local roots are mapped as 'nobody' users (usually uid=65534).
60 | #10.0.0.0-10.0.0.5 /test rw,maproot=nobody,password=test
61 |
62 | # Users from IP 10.1.0.0-10.1.255.255 can mount 'public' subdirectory as a standard read/write file system. All users are mapped as users with uid:gid = 1000:1000.
63 | #10.1.0.0/255.255.0.0 /public rw,mapall=1000:1000
64 |
65 | # Users from IP 10.2.0.0-10.2.255.255 can mount everything, but can't decrease trash time below 2 hours and 30 minutes and above 2 weeks
66 | #10.2.0.0/16 / rw,alldirs,maproot=0,mintrashtime=2h30m,maxtrashtime=2w
67 |
--------------------------------------------------------------------------------
/tools/output.log:
--------------------------------------------------------------------------------
1 |
2 | PLAY [all] ********************************************************************
3 |
4 | GATHERING FACTS ***************************************************************
5 | ok: [demoenv-node-2]
6 | ok: [demoenv-secondary]
7 | ok: [demoenv-node-3]
8 | ok: [demoenv-node-1]
9 | ok: [demoenv-master]
10 |
11 | TASK: [create adm users] ******************************************************
12 | ok: [demoenv-node-3] => (item=dong.guo)
13 | ok: [demoenv-node-2] => (item=dong.guo)
14 | ok: [demoenv-secondary] => (item=dong.guo)
15 | ok: [demoenv-node-1] => (item=dong.guo)
16 | ok: [demoenv-master] => (item=dong.guo)
17 |
18 | PLAY [moosefs_all] ************************************************************
19 |
20 | TASK: [create rpmforge repo] **************************************************
21 | skipping: [demoenv-secondary]
22 | skipping: [demoenv-node-3]
23 | skipping: [demoenv-node-1]
24 | skipping: [demoenv-node-2]
25 | skipping: [demoenv-master]
26 |
27 | TASK: [install mfs common packages] *******************************************
28 | ok: [demoenv-node-1]
29 | ok: [demoenv-node-2]
30 | ok: [demoenv-secondary]
31 | ok: [demoenv-node-3]
32 | ok: [demoenv-master]
33 |
34 | PLAY [moosefs_master] *********************************************************
35 |
36 | TASK: [copy the mfsmaster configurations] *************************************
37 | ok: [demoenv-master] => (item=mfsmaster.cfg)
38 | ok: [demoenv-master] => (item=mfsexports.cfg)
39 | ok: [demoenv-master] => (item=mfsmetalogger.cfg)
40 |
41 | TASK: [create metadata.mfs] ***************************************************
42 | skipping: [demoenv-master]
43 |
44 | TASK: [chown /var/mfs to daemon.daemon] ***************************************
45 | ok: [demoenv-master]
46 |
47 | TASK: [start mfsmaster service] ***********************************************
48 | ok: [demoenv-master]
49 |
50 | TASK: [install httpd package] *************************************************
51 | ok: [demoenv-master]
52 |
53 | TASK: [copy the httpd configuration] ******************************************
54 | ok: [demoenv-master]
55 |
56 | TASK: [install mfs-cgi package] ***********************************************
57 | ok: [demoenv-master]
58 |
59 | TASK: [copy the index.html] ***************************************************
60 | ok: [demoenv-master]
61 |
62 | TASK: [start httpd service] ***************************************************
63 | ok: [demoenv-master]
64 |
65 | PLAY [moosefs_backup] *********************************************************
66 |
67 | TASK: [copy the mfsmetalogger configurations] *********************************
68 | ok: [demoenv-secondary] => (item=mfsmetalogger.cfg)
69 |
70 | TASK: [start mfsmetalogger service] *******************************************
71 | ok: [demoenv-secondary]
72 |
73 | TASK: [install mfs client package] ********************************************
74 | ok: [demoenv-secondary]
75 |
76 | TASK: [create mfsclient mountpoint directory] *********************************
77 | ok: [demoenv-secondary] => (item=/mnt/mfsmount)
78 |
79 | TASK: [mount moosefs] *********************************************************
80 | ok: [demoenv-secondary] => (item=/mnt/mfsmount)
81 |
82 | PLAY [moosefs_datanode] *******************************************************
83 |
84 | TASK: [copy the mfschunkserver configurations] ********************************
85 | ok: [demoenv-node-3] => (item=mfschunkserver.cfg)
86 | ok: [demoenv-node-1] => (item=mfschunkserver.cfg)
87 | ok: [demoenv-node-2] => (item=mfschunkserver.cfg)
88 | ok: [demoenv-node-3] => (item=mfshdd.cfg)
89 | ok: [demoenv-node-1] => (item=mfshdd.cfg)
90 | ok: [demoenv-node-2] => (item=mfshdd.cfg)
91 |
92 | TASK: [create mfshdd directories] *********************************************
93 | ok: [demoenv-node-1] => (item=/mnt/mfschunks1)
94 | ok: [demoenv-node-3] => (item=/mnt/mfschunks1)
95 | ok: [demoenv-node-2] => (item=/mnt/mfschunks1)
96 | ok: [demoenv-node-1] => (item=/mnt/mfschunks2)
97 | ok: [demoenv-node-3] => (item=/mnt/mfschunks2)
98 | ok: [demoenv-node-2] => (item=/mnt/mfschunks2)
99 |
100 | TASK: [start mfschunkserver service] ******************************************
101 | ok: [demoenv-node-3]
102 | ok: [demoenv-node-1]
103 | ok: [demoenv-node-2]
104 |
105 | PLAY RECAP ********************************************************************
106 | demoenv-master : ok=11 changed=0 unreachable=0 failed=0
107 | demoenv-node-1 : ok=6 changed=0 unreachable=0 failed=0
108 | demoenv-node-2 : ok=6 changed=0 unreachable=0 failed=0
109 | demoenv-node-3 : ok=6 changed=0 unreachable=0 failed=0
110 | demoenv-secondary : ok=8 changed=0 unreachable=0 failed=0
111 |
--------------------------------------------------------------------------------
/roles/moosefs_master/templates/httpd.conf.j2:
--------------------------------------------------------------------------------
1 | #
2 | # This is the main Apache server configuration file. It contains the
3 | # configuration directives that give the server its instructions.
4 | # See for detailed information.
5 | # In particular, see
6 | #
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 );
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. Note the PIDFILE variable in
62 | # /etc/sysconfig/httpd must be set appropriately if this location is
63 | # changed.
64 | #
65 | PidFile run/httpd.pid
66 |
67 | #
68 | # Timeout: The number of seconds before receives and sends time out.
69 | #
70 | Timeout 60
71 |
72 | #
73 | # KeepAlive: Whether or not to allow persistent connections (more than
74 | # one request per connection). Set to "Off" to deactivate.
75 | #
76 | KeepAlive Off
77 |
78 | #
79 | # MaxKeepAliveRequests: The maximum number of requests to allow
80 | # during a persistent connection. Set to 0 to allow an unlimited amount.
81 | # We recommend you leave this number high, for maximum performance.
82 | #
83 | MaxKeepAliveRequests 100
84 |
85 | #
86 | # KeepAliveTimeout: Number of seconds to wait for the next request from the
87 | # same client on the same connection.
88 | #
89 | KeepAliveTimeout 15
90 |
91 | ##
92 | ## Server-Pool Size Regulation (MPM specific)
93 | ##
94 |
95 | # prefork MPM
96 | # StartServers: number of server processes to start
97 | # MinSpareServers: minimum number of server processes which are kept spare
98 | # MaxSpareServers: maximum number of server processes which are kept spare
99 | # ServerLimit: maximum value for MaxClients for the lifetime of the server
100 | # MaxClients: maximum number of server processes allowed to start
101 | # MaxRequestsPerChild: maximum number of requests a server process serves
102 |
103 | StartServers 8
104 | MinSpareServers 5
105 | MaxSpareServers 20
106 | ServerLimit 256
107 | MaxClients 256
108 | MaxRequestsPerChild 4000
109 |
110 |
111 | # worker MPM
112 | # StartServers: initial number of server processes to start
113 | # MaxClients: maximum number of simultaneous client connections
114 | # MinSpareThreads: minimum number of worker threads which are kept spare
115 | # MaxSpareThreads: maximum number of worker threads which are kept spare
116 | # ThreadsPerChild: constant number of worker threads in each server process
117 | # MaxRequestsPerChild: maximum number of requests a server process serves
118 |
119 | StartServers 4
120 | MaxClients 300
121 | MinSpareThreads 25
122 | MaxSpareThreads 75
123 | ThreadsPerChild 25
124 | MaxRequestsPerChild 0
125 |
126 |
127 | #
128 | # Listen: Allows you to bind Apache to specific IP addresses and/or
129 | # ports, in addition to the default. See also the
130 | # directive.
131 | #
132 | # Change this to Listen on specific IP addresses as shown below to
133 | # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
134 | #
135 | #Listen 12.34.56.78:80
136 | Listen {{ moosefs['httpd_port'] }}
137 |
138 | #
139 | # Dynamic Shared Object (DSO) Support
140 | #
141 | # To be able to use the functionality of a module which was built as a DSO you
142 | # have to place corresponding `LoadModule' lines at this location so the
143 | # directives contained in it are actually available _before_ they are used.
144 | # Statically compiled modules (those listed by `httpd -l') do not need
145 | # to be loaded here.
146 | #
147 | # Example:
148 | # LoadModule foo_module modules/mod_foo.so
149 | #
150 | LoadModule auth_basic_module modules/mod_auth_basic.so
151 | LoadModule auth_digest_module modules/mod_auth_digest.so
152 | LoadModule authn_file_module modules/mod_authn_file.so
153 | LoadModule authn_alias_module modules/mod_authn_alias.so
154 | LoadModule authn_anon_module modules/mod_authn_anon.so
155 | LoadModule authn_dbm_module modules/mod_authn_dbm.so
156 | LoadModule authn_default_module modules/mod_authn_default.so
157 | LoadModule authz_host_module modules/mod_authz_host.so
158 | LoadModule authz_user_module modules/mod_authz_user.so
159 | LoadModule authz_owner_module modules/mod_authz_owner.so
160 | LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
161 | LoadModule authz_dbm_module modules/mod_authz_dbm.so
162 | LoadModule authz_default_module modules/mod_authz_default.so
163 | LoadModule ldap_module modules/mod_ldap.so
164 | LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
165 | LoadModule include_module modules/mod_include.so
166 | LoadModule log_config_module modules/mod_log_config.so
167 | LoadModule logio_module modules/mod_logio.so
168 | LoadModule env_module modules/mod_env.so
169 | LoadModule ext_filter_module modules/mod_ext_filter.so
170 | LoadModule mime_magic_module modules/mod_mime_magic.so
171 | LoadModule expires_module modules/mod_expires.so
172 | LoadModule deflate_module modules/mod_deflate.so
173 | LoadModule headers_module modules/mod_headers.so
174 | LoadModule usertrack_module modules/mod_usertrack.so
175 | LoadModule setenvif_module modules/mod_setenvif.so
176 | LoadModule mime_module modules/mod_mime.so
177 | LoadModule dav_module modules/mod_dav.so
178 | LoadModule status_module modules/mod_status.so
179 | LoadModule autoindex_module modules/mod_autoindex.so
180 | LoadModule info_module modules/mod_info.so
181 | LoadModule dav_fs_module modules/mod_dav_fs.so
182 | LoadModule vhost_alias_module modules/mod_vhost_alias.so
183 | LoadModule negotiation_module modules/mod_negotiation.so
184 | LoadModule dir_module modules/mod_dir.so
185 | LoadModule actions_module modules/mod_actions.so
186 | LoadModule speling_module modules/mod_speling.so
187 | LoadModule userdir_module modules/mod_userdir.so
188 | LoadModule alias_module modules/mod_alias.so
189 | LoadModule substitute_module modules/mod_substitute.so
190 | LoadModule rewrite_module modules/mod_rewrite.so
191 | LoadModule proxy_module modules/mod_proxy.so
192 | LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
193 | LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
194 | LoadModule proxy_http_module modules/mod_proxy_http.so
195 | LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
196 | LoadModule proxy_connect_module modules/mod_proxy_connect.so
197 | LoadModule cache_module modules/mod_cache.so
198 | LoadModule suexec_module modules/mod_suexec.so
199 | LoadModule disk_cache_module modules/mod_disk_cache.so
200 | LoadModule cgi_module modules/mod_cgi.so
201 | LoadModule version_module modules/mod_version.so
202 |
203 | #
204 | # The following modules are not loaded by default:
205 | #
206 | #LoadModule asis_module modules/mod_asis.so
207 | #LoadModule authn_dbd_module modules/mod_authn_dbd.so
208 | #LoadModule cern_meta_module modules/mod_cern_meta.so
209 | #LoadModule cgid_module modules/mod_cgid.so
210 | #LoadModule dbd_module modules/mod_dbd.so
211 | #LoadModule dumpio_module modules/mod_dumpio.so
212 | #LoadModule filter_module modules/mod_filter.so
213 | #LoadModule ident_module modules/mod_ident.so
214 | #LoadModule log_forensic_module modules/mod_log_forensic.so
215 | #LoadModule unique_id_module modules/mod_unique_id.so
216 | #
217 |
218 | #
219 | # Load config files from the config directory "/etc/httpd/conf.d".
220 | #
221 | Include conf.d/*.conf
222 |
223 | #
224 | # ExtendedStatus controls whether Apache will generate "full" status
225 | # information (ExtendedStatus On) or just basic information (ExtendedStatus
226 | # Off) when the "server-status" handler is called. The default is Off.
227 | #
228 | #ExtendedStatus On
229 |
230 | #
231 | # If you wish httpd to run as a different user or group, you must run
232 | # httpd as root initially and it will switch.
233 | #
234 | # User/Group: The name (or #number) of the user/group to run httpd as.
235 | # . On SCO (ODT 3) use "User nouser" and "Group nogroup".
236 | # . On HPUX you may not be able to use shared memory as nobody, and the
237 | # suggested workaround is to create a user www and use that user.
238 | # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
239 | # when the value of (unsigned)Group is above 60000;
240 | # don't use Group #-1 on these systems!
241 | #
242 | User apache
243 | Group apache
244 |
245 | ### Section 2: 'Main' server configuration
246 | #
247 | # The directives in this section set up the values used by the 'main'
248 | # server, which responds to any requests that aren't handled by a
249 | # definition. These values also provide defaults for
250 | # any containers you may define later in the file.
251 | #
252 | # All of these directives may appear inside containers,
253 | # in which case these default settings will be overridden for the
254 | # virtual host being defined.
255 | #
256 |
257 | #
258 | # ServerAdmin: Your address, where problems with the server should be
259 | # e-mailed. This address appears on some server-generated pages, such
260 | # as error documents. e.g. admin@your-domain.com
261 | #
262 | ServerAdmin root@localhost
263 |
264 | #
265 | # ServerName gives the name and port that the server uses to identify itself.
266 | # This can often be determined automatically, but we recommend you specify
267 | # it explicitly to prevent problems during startup.
268 | #
269 | # If this is not set to valid DNS name for your host, server-generated
270 | # redirections will not work. See also the UseCanonicalName directive.
271 | #
272 | # If your host doesn't have a registered DNS name, enter its IP address here.
273 | # You will have to access it by its address anyway, and this will make
274 | # redirections work in a sensible way.
275 | #
276 | #ServerName www.example.com:80
277 |
278 | #
279 | # UseCanonicalName: Determines how Apache constructs self-referencing
280 | # URLs and the SERVER_NAME and SERVER_PORT variables.
281 | # When set "Off", Apache will use the Hostname and Port supplied
282 | # by the client. When set "On", Apache will use the value of the
283 | # ServerName directive.
284 | #
285 | UseCanonicalName Off
286 |
287 | #
288 | # DocumentRoot: The directory out of which you will serve your
289 | # documents. By default, all requests are taken from this directory, but
290 | # symbolic links and aliases may be used to point to other locations.
291 | #
292 | DocumentRoot "/var/www/html"
293 |
294 | #
295 | # Each directory to which Apache has access can be configured with respect
296 | # to which services and features are allowed and/or disabled in that
297 | # directory (and its subdirectories).
298 | #
299 | # First, we configure the "default" to be a very restrictive set of
300 | # features.
301 | #
302 |
303 | Options FollowSymLinks
304 | AllowOverride None
305 |
306 |
307 | #
308 | # Note that from this point forward you must specifically allow
309 | # particular features to be enabled - so if something's not working as
310 | # you might expect, make sure that you have specifically enabled it
311 | # below.
312 | #
313 |
314 | #
315 | # This should be changed to whatever you set DocumentRoot to.
316 | #
317 |
318 |
319 | #
320 | # Possible values for the Options directive are "None", "All",
321 | # or any combination of:
322 | # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
323 | #
324 | # Note that "MultiViews" must be named *explicitly* --- "Options All"
325 | # doesn't give it to you.
326 | #
327 | # The Options directive is both complicated and important. Please see
328 | # http://httpd.apache.org/docs/2.2/mod/core.html#options
329 | # for more information.
330 | #
331 | Options Indexes FollowSymLinks
332 |
333 | #
334 | # AllowOverride controls what directives may be placed in .htaccess files.
335 | # It can be "All", "None", or any combination of the keywords:
336 | # Options FileInfo AuthConfig Limit
337 | #
338 | AllowOverride None
339 |
340 | #
341 | # Controls who can get stuff from this server.
342 | #
343 | Order allow,deny
344 | Allow from all
345 |
346 |
347 |
348 | #
349 | # UserDir: The name of the directory that is appended onto a user's home
350 | # directory if a ~user request is received.
351 | #
352 | # The path to the end user account 'public_html' directory must be
353 | # accessible to the webserver userid. This usually means that ~userid
354 | # must have permissions of 711, ~userid/public_html must have permissions
355 | # of 755, and documents contained therein must be world-readable.
356 | # Otherwise, the client will only receive a "403 Forbidden" message.
357 | #
358 | # See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
359 | #
360 |
361 | #
362 | # UserDir is disabled by default since it can confirm the presence
363 | # of a username on the system (depending on home directory
364 | # permissions).
365 | #
366 | UserDir disabled
367 |
368 | #
369 | # To enable requests to /~user/ to serve the user's public_html
370 | # directory, remove the "UserDir disabled" line above, and uncomment
371 | # the following line instead:
372 | #
373 | #UserDir public_html
374 |
375 |
376 |
377 | #
378 | # Control access to UserDir directories. The following is an example
379 | # for a site where these directories are restricted to read-only.
380 | #
381 | #
382 | # AllowOverride FileInfo AuthConfig Limit
383 | # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
384 | #
385 | # Order allow,deny
386 | # Allow from all
387 | #
388 | #
389 | # Order deny,allow
390 | # Deny from all
391 | #
392 | #
393 |
394 | #
395 | # DirectoryIndex: sets the file that Apache will serve if a directory
396 | # is requested.
397 | #
398 | # The index.html.var file (a type-map) is used to deliver content-
399 | # negotiated documents. The MultiViews Option can be used for the
400 | # same purpose, but it is much slower.
401 | #
402 | DirectoryIndex index.html index.html.var
403 |
404 | #
405 | # AccessFileName: The name of the file to look for in each directory
406 | # for additional configuration directives. See also the AllowOverride
407 | # directive.
408 | #
409 | AccessFileName .htaccess
410 |
411 | #
412 | # The following lines prevent .htaccess and .htpasswd files from being
413 | # viewed by Web clients.
414 | #
415 |
416 | Order allow,deny
417 | Deny from all
418 | Satisfy All
419 |
420 |
421 | #
422 | # TypesConfig describes where the mime.types file (or equivalent) is
423 | # to be found.
424 | #
425 | TypesConfig /etc/mime.types
426 |
427 | #
428 | # DefaultType is the default MIME type the server will use for a document
429 | # if it cannot otherwise determine one, such as from filename extensions.
430 | # If your server contains mostly text or HTML documents, "text/plain" is
431 | # a good value. If most of your content is binary, such as applications
432 | # or images, you may want to use "application/octet-stream" instead to
433 | # keep browsers from trying to display binary files as though they are
434 | # text.
435 | #
436 | DefaultType text/plain
437 |
438 | #
439 | # The mod_mime_magic module allows the server to use various hints from the
440 | # contents of the file itself to determine its type. The MIMEMagicFile
441 | # directive tells the module where the hint definitions are located.
442 | #
443 |
444 | # MIMEMagicFile /usr/share/magic.mime
445 | MIMEMagicFile conf/magic
446 |
447 |
448 | #
449 | # HostnameLookups: Log the names of clients or just their IP addresses
450 | # e.g., www.apache.org (on) or 204.62.129.132 (off).
451 | # The default is off because it'd be overall better for the net if people
452 | # had to knowingly turn this feature on, since enabling it means that
453 | # each client request will result in AT LEAST one lookup request to the
454 | # nameserver.
455 | #
456 | HostnameLookups Off
457 |
458 | #
459 | # EnableMMAP: Control whether memory-mapping is used to deliver
460 | # files (assuming that the underlying OS supports it).
461 | # The default is on; turn this off if you serve from NFS-mounted
462 | # filesystems. On some systems, turning it off (regardless of
463 | # filesystem) can improve performance; for details, please see
464 | # http://httpd.apache.org/docs/2.2/mod/core.html#enablemmap
465 | #
466 | #EnableMMAP off
467 |
468 | #
469 | # EnableSendfile: Control whether the sendfile kernel support is
470 | # used to deliver files (assuming that the OS supports it).
471 | # The default is on; turn this off if you serve from NFS-mounted
472 | # filesystems. Please see
473 | # http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile
474 | #
475 | #EnableSendfile off
476 |
477 | #
478 | # ErrorLog: The location of the error log file.
479 | # If you do not specify an ErrorLog directive within a
480 | # container, error messages relating to that virtual host will be
481 | # logged here. If you *do* define an error logfile for a
482 | # container, that host's errors will be logged there and not here.
483 | #
484 | ErrorLog logs/error_log
485 |
486 | #
487 | # LogLevel: Control the number of messages logged to the error_log.
488 | # Possible values include: debug, info, notice, warn, error, crit,
489 | # alert, emerg.
490 | #
491 | LogLevel warn
492 |
493 | #
494 | # The following directives define some format nicknames for use with
495 | # a CustomLog directive (see below).
496 | #
497 | LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
498 | LogFormat "%h %l %u %t \"%r\" %>s %b" common
499 | LogFormat "%{Referer}i -> %U" referer
500 | LogFormat "%{User-agent}i" agent
501 |
502 | # "combinedio" includes actual counts of actual bytes received (%I) and sent (%O); this
503 | # requires the mod_logio module to be loaded.
504 | #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
505 |
506 | #
507 | # The location and format of the access logfile (Common Logfile Format).
508 | # If you do not define any access logfiles within a
509 | # container, they will be logged here. Contrariwise, if you *do*
510 | # define per- access logfiles, transactions will be
511 | # logged therein and *not* in this file.
512 | #
513 | #CustomLog logs/access_log common
514 |
515 | #
516 | # If you would like to have separate agent and referer logfiles, uncomment
517 | # the following directives.
518 | #
519 | #CustomLog logs/referer_log referer
520 | #CustomLog logs/agent_log agent
521 |
522 | #
523 | # For a single logfile with access, agent, and referer information
524 | # (Combined Logfile Format), use the following directive:
525 | #
526 | CustomLog logs/access_log combined
527 |
528 | #
529 | # Optionally add a line containing the server version and virtual host
530 | # name to server-generated pages (internal error documents, FTP directory
531 | # listings, mod_status and mod_info output etc., but not CGI generated
532 | # documents or custom error documents).
533 | # Set to "EMail" to also include a mailto: link to the ServerAdmin.
534 | # Set to one of: On | Off | EMail
535 | #
536 | ServerSignature On
537 |
538 | #
539 | # Aliases: Add here as many aliases as you need (with no limit). The format is
540 | # Alias fakename realname
541 | #
542 | # Note that if you include a trailing / on fakename then the server will
543 | # require it to be present in the URL. So "/icons" isn't aliased in this
544 | # example, only "/icons/". If the fakename is slash-terminated, then the
545 | # realname must also be slash terminated, and if the fakename omits the
546 | # trailing slash, the realname must also omit it.
547 | #
548 | # We include the /icons/ alias for FancyIndexed directory listings. If you
549 | # do not use FancyIndexing, you may comment this out.
550 | #
551 | Alias /icons/ "/var/www/icons/"
552 |
553 |
554 | Options Indexes MultiViews FollowSymLinks
555 | AllowOverride None
556 | Order allow,deny
557 | Allow from all
558 |
559 |
560 | #
561 | # WebDAV module configuration section.
562 | #
563 |
564 | # Location of the WebDAV lock database.
565 | DAVLockDB /var/lib/dav/lockdb
566 |
567 |
568 | #
569 | # ScriptAlias: This controls which directories contain server scripts.
570 | # ScriptAliases are essentially the same as Aliases, except that
571 | # documents in the realname directory are treated as applications and
572 | # run by the server when requested rather than as documents sent to the client.
573 | # The same rules about trailing "/" apply to ScriptAlias directives as to
574 | # Alias.
575 | #
576 | ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
577 |
578 | #
579 | # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
580 | # CGI directory exists, if you have that configured.
581 | #
582 |
583 | AllowOverride None
584 | Options None
585 | Order allow,deny
586 | Allow from all
587 |
588 |
589 | #
590 | # Redirect allows you to tell clients about documents which used to exist in
591 | # your server's namespace, but do not anymore. This allows you to tell the
592 | # clients where to look for the relocated document.
593 | # Example:
594 | # Redirect permanent /foo http://www.example.com/bar
595 |
596 | #
597 | # Directives controlling the display of server-generated directory listings.
598 | #
599 |
600 | #
601 | # IndexOptions: Controls the appearance of server-generated directory
602 | # listings.
603 | #
604 | IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8
605 |
606 | #
607 | # AddIcon* directives tell the server which icon to show for different
608 | # files or filename extensions. These are only displayed for
609 | # FancyIndexed directories.
610 | #
611 | AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
612 |
613 | AddIconByType (TXT,/icons/text.gif) text/*
614 | AddIconByType (IMG,/icons/image2.gif) image/*
615 | AddIconByType (SND,/icons/sound2.gif) audio/*
616 | AddIconByType (VID,/icons/movie.gif) video/*
617 |
618 | AddIcon /icons/binary.gif .bin .exe
619 | AddIcon /icons/binhex.gif .hqx
620 | AddIcon /icons/tar.gif .tar
621 | AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
622 | AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
623 | AddIcon /icons/a.gif .ps .ai .eps
624 | AddIcon /icons/layout.gif .html .shtml .htm .pdf
625 | AddIcon /icons/text.gif .txt
626 | AddIcon /icons/c.gif .c
627 | AddIcon /icons/p.gif .pl .py
628 | AddIcon /icons/f.gif .for
629 | AddIcon /icons/dvi.gif .dvi
630 | AddIcon /icons/uuencoded.gif .uu
631 | AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
632 | AddIcon /icons/tex.gif .tex
633 | AddIcon /icons/bomb.gif core
634 |
635 | AddIcon /icons/back.gif ..
636 | AddIcon /icons/hand.right.gif README
637 | AddIcon /icons/folder.gif ^^DIRECTORY^^
638 | AddIcon /icons/blank.gif ^^BLANKICON^^
639 |
640 | #
641 | # DefaultIcon is which icon to show for files which do not have an icon
642 | # explicitly set.
643 | #
644 | DefaultIcon /icons/unknown.gif
645 |
646 | #
647 | # AddDescription allows you to place a short description after a file in
648 | # server-generated indexes. These are only displayed for FancyIndexed
649 | # directories.
650 | # Format: AddDescription "description" filename
651 | #
652 | #AddDescription "GZIP compressed document" .gz
653 | #AddDescription "tar archive" .tar
654 | #AddDescription "GZIP compressed tar archive" .tgz
655 |
656 | #
657 | # ReadmeName is the name of the README file the server will look for by
658 | # default, and append to directory listings.
659 | #
660 | # HeaderName is the name of a file which should be prepended to
661 | # directory indexes.
662 | ReadmeName README.html
663 | HeaderName HEADER.html
664 |
665 | #
666 | # IndexIgnore is a set of filenames which directory indexing should ignore
667 | # and not include in the listing. Shell-style wildcarding is permitted.
668 | #
669 | IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
670 |
671 | #
672 | # DefaultLanguage and AddLanguage allows you to specify the language of
673 | # a document. You can then use content negotiation to give a browser a
674 | # file in a language the user can understand.
675 | #
676 | # Specify a default language. This means that all data
677 | # going out without a specific language tag (see below) will
678 | # be marked with this one. You probably do NOT want to set
679 | # this unless you are sure it is correct for all cases.
680 | #
681 | # * It is generally better to not mark a page as
682 | # * being a certain language than marking it with the wrong
683 | # * language!
684 | #
685 | # DefaultLanguage nl
686 | #
687 | # Note 1: The suffix does not have to be the same as the language
688 | # keyword --- those with documents in Polish (whose net-standard
689 | # language code is pl) may wish to use "AddLanguage pl .po" to
690 | # avoid the ambiguity with the common suffix for perl scripts.
691 | #
692 | # Note 2: The example entries below illustrate that in some cases
693 | # the two character 'Language' abbreviation is not identical to
694 | # the two character 'Country' code for its country,
695 | # E.g. 'Danmark/dk' versus 'Danish/da'.
696 | #
697 | # Note 3: In the case of 'ltz' we violate the RFC by using a three char
698 | # specifier. There is 'work in progress' to fix this and get
699 | # the reference data for rfc1766 cleaned up.
700 | #
701 | # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
702 | # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
703 | # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
704 | # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
705 | # Norwegian (no) - Polish (pl) - Portugese (pt)
706 | # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
707 | # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
708 | #
709 | AddLanguage ca .ca
710 | AddLanguage cs .cz .cs
711 | AddLanguage da .dk
712 | AddLanguage de .de
713 | AddLanguage el .el
714 | AddLanguage en .en
715 | AddLanguage eo .eo
716 | AddLanguage es .es
717 | AddLanguage et .et
718 | AddLanguage fr .fr
719 | AddLanguage he .he
720 | AddLanguage hr .hr
721 | AddLanguage it .it
722 | AddLanguage ja .ja
723 | AddLanguage ko .ko
724 | AddLanguage ltz .ltz
725 | AddLanguage nl .nl
726 | AddLanguage nn .nn
727 | AddLanguage no .no
728 | AddLanguage pl .po
729 | AddLanguage pt .pt
730 | AddLanguage pt-BR .pt-br
731 | AddLanguage ru .ru
732 | AddLanguage sv .sv
733 | AddLanguage zh-CN .zh-cn
734 | AddLanguage zh-TW .zh-tw
735 |
736 | #
737 | # LanguagePriority allows you to give precedence to some languages
738 | # in case of a tie during content negotiation.
739 | #
740 | # Just list the languages in decreasing order of preference. We have
741 | # more or less alphabetized them here. You probably want to change this.
742 | #
743 | 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
744 |
745 | #
746 | # ForceLanguagePriority allows you to serve a result page rather than
747 | # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
748 | # [in case no accepted languages matched the available variants]
749 | #
750 | ForceLanguagePriority Prefer Fallback
751 |
752 | #
753 | # Specify a default charset for all content served; this enables
754 | # interpretation of all content as UTF-8 by default. To use the
755 | # default browser choice (ISO-8859-1), or to allow the META tags
756 | # in HTML content to override this choice, comment out this
757 | # directive:
758 | #
759 | AddDefaultCharset UTF-8
760 |
761 | #
762 | # AddType allows you to add to or override the MIME configuration
763 | # file mime.types for specific file types.
764 | #
765 | #AddType application/x-tar .tgz
766 |
767 | #
768 | # AddEncoding allows you to have certain browsers uncompress
769 | # information on the fly. Note: Not all browsers support this.
770 | # Despite the name similarity, the following Add* directives have nothing
771 | # to do with the FancyIndexing customization directives above.
772 | #
773 | #AddEncoding x-compress .Z
774 | #AddEncoding x-gzip .gz .tgz
775 |
776 | # If the AddEncoding directives above are commented-out, then you
777 | # probably should define those extensions to indicate media types:
778 | #
779 | AddType application/x-compress .Z
780 | AddType application/x-gzip .gz .tgz
781 |
782 | #
783 | # MIME-types for downloading Certificates and CRLs
784 | #
785 | AddType application/x-x509-ca-cert .crt
786 | AddType application/x-pkcs7-crl .crl
787 |
788 | #
789 | # AddHandler allows you to map certain file extensions to "handlers":
790 | # actions unrelated to filetype. These can be either built into the server
791 | # or added with the Action directive (see below)
792 | #
793 | # To use CGI scripts outside of ScriptAliased directories:
794 | # (You will also need to add "ExecCGI" to the "Options" directive.)
795 | #
796 | #AddHandler cgi-script .cgi
797 |
798 | #
799 | # For files that include their own HTTP headers:
800 | #
801 | #AddHandler send-as-is asis
802 |
803 | #
804 | # For type maps (negotiated resources):
805 | # (This is enabled by default to allow the Apache "It Worked" page
806 | # to be distributed in multiple languages.)
807 | #
808 | AddHandler type-map var
809 |
810 | #
811 | # Filters allow you to process content before it is sent to the client.
812 | #
813 | # To parse .shtml files for server-side includes (SSI):
814 | # (You will also need to add "Includes" to the "Options" directive.)
815 | #
816 | AddType text/html .shtml
817 | AddOutputFilter INCLUDES .shtml
818 |
819 | #
820 | # Action lets you define media types that will execute a script whenever
821 | # a matching file is called. This eliminates the need for repeated URL
822 | # pathnames for oft-used CGI file processors.
823 | # Format: Action media/type /cgi-script/location
824 | # Format: Action handler-name /cgi-script/location
825 | #
826 |
827 | #
828 | # Customizable error responses come in three flavors:
829 | # 1) plain text 2) local redirects 3) external redirects
830 | #
831 | # Some examples:
832 | #ErrorDocument 500 "The server made a boo boo."
833 | #ErrorDocument 404 /missing.html
834 | #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
835 | #ErrorDocument 402 http://www.example.com/subscription_info.html
836 | #
837 |
838 | #
839 | # Putting this all together, we can internationalize error responses.
840 | #
841 | # We use Alias to redirect any /error/HTTP_.html.var response to
842 | # our collection of by-error message multi-language collections. We use
843 | # includes to substitute the appropriate text.
844 | #
845 | # You can modify the messages' appearance without changing any of the
846 | # default HTTP_.html.var files by adding the line:
847 | #
848 | # Alias /error/include/ "/your/include/path/"
849 | #
850 | # which allows you to create your own set of files by starting with the
851 | # /var/www/error/include/ files and
852 | # copying them to /your/include/path/, even on a per-VirtualHost basis.
853 | #
854 |
855 | Alias /error/ "/var/www/error/"
856 |
857 |
858 |
859 |
860 | AllowOverride None
861 | Options IncludesNoExec
862 | AddOutputFilter Includes html
863 | AddHandler type-map var
864 | Order allow,deny
865 | Allow from all
866 | LanguagePriority en es de fr
867 | ForceLanguagePriority Prefer Fallback
868 |
869 |
870 | # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
871 | # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
872 | # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
873 | # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
874 | # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
875 | # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
876 | # ErrorDocument 410 /error/HTTP_GONE.html.var
877 | # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
878 | # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
879 | # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
880 | # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
881 | # ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
882 | # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
883 | # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
884 | # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
885 | # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
886 | # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
887 |
888 |
889 |
890 |
891 | #
892 | # The following directives modify normal HTTP response behavior to
893 | # handle known problems with browser implementations.
894 | #
895 | BrowserMatch "Mozilla/2" nokeepalive
896 | BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
897 | BrowserMatch "RealPlayer 4\.0" force-response-1.0
898 | BrowserMatch "Java/1\.0" force-response-1.0
899 | BrowserMatch "JDK/1\.0" force-response-1.0
900 |
901 | #
902 | # The following directive disables redirects on non-GET requests for
903 | # a directory that does not include the trailing slash. This fixes a
904 | # problem with Microsoft WebFolders which does not appropriately handle
905 | # redirects for folders with DAV methods.
906 | # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
907 | #
908 | BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
909 | BrowserMatch "MS FrontPage" redirect-carefully
910 | BrowserMatch "^WebDrive" redirect-carefully
911 | BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
912 | BrowserMatch "^gnome-vfs/1.0" redirect-carefully
913 | BrowserMatch "^XML Spy" redirect-carefully
914 | BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
915 |
916 | #
917 | # Allow server status reports generated by mod_status,
918 | # with the URL of http://servername/server-status
919 | # Change the ".example.com" to match your domain to enable.
920 | #
921 | #
922 | # SetHandler server-status
923 | # Order deny,allow
924 | # Deny from all
925 | # Allow from .example.com
926 | #
927 |
928 | #
929 | # Allow remote server configuration reports, with the URL of
930 | # http://servername/server-info (requires that mod_info.c be loaded).
931 | # Change the ".example.com" to match your domain to enable.
932 | #
933 | #
934 | # SetHandler server-info
935 | # Order deny,allow
936 | # Deny from all
937 | # Allow from .example.com
938 | #
939 |
940 | #
941 | # Proxy Server directives. Uncomment the following lines to
942 | # enable the proxy server:
943 | #
944 | #
945 | #ProxyRequests On
946 | #
947 | #
948 | # Order deny,allow
949 | # Deny from all
950 | # Allow from .example.com
951 | #
952 |
953 | #
954 | # Enable/disable the handling of HTTP/1.1 "Via:" headers.
955 | # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
956 | # Set to one of: Off | On | Full | Block
957 | #
958 | #ProxyVia On
959 |
960 | #
961 | # To enable a cache of proxied content, uncomment the following lines.
962 | # See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
963 | #
964 | #
965 | # CacheEnable disk /
966 | # CacheRoot "/var/cache/mod_proxy"
967 | #
968 | #
969 |
970 | #
971 | # End of proxy directives.
972 |
973 | ### Section 3: Virtual Hosts
974 | #
975 | # VirtualHost: If you want to maintain multiple domains/hostnames on your
976 | # machine you can setup VirtualHost containers for them. Most configurations
977 | # use only name-based virtual hosts so the server doesn't need to worry about
978 | # IP addresses. This is indicated by the asterisks in the directives below.
979 | #
980 | # Please see the documentation at
981 | #
982 | # for further details before you try to setup virtual hosts.
983 | #
984 | # You may use the command line option '-S' to verify your virtual host
985 | # configuration.
986 |
987 | #
988 | # Use name-based virtual hosting.
989 | #
990 | #NameVirtualHost *:80
991 | #
992 | # NOTE: NameVirtualHost cannot be used without a port specifier
993 | # (e.g. :80) if mod_ssl is being used, due to the nature of the
994 | # SSL protocol.
995 | #
996 |
997 | #
998 | # VirtualHost example:
999 | # Almost any Apache directive may go into a VirtualHost container.
1000 | # The first VirtualHost section is used for requests without a known
1001 | # server name.
1002 | #
1003 | #
1004 | # ServerAdmin webmaster@dummy-host.example.com
1005 | # DocumentRoot /www/docs/dummy-host.example.com
1006 | # ServerName dummy-host.example.com
1007 | # ErrorLog logs/dummy-host.example.com-error_log
1008 | # CustomLog logs/dummy-host.example.com-access_log common
1009 | #
1010 |
--------------------------------------------------------------------------------