summaryrefslogtreecommitdiff
path: root/puppet/templates/apache/vhosts/mail.erb
blob: 3badcf0f81ec8506efa4e39b33bbc43bbc3b8241 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# begin vhost for mail.<%= domain >
<VirtualHost *:80>
  ServerName mail.<%= domain >
  #DocumentRoot /usr/share/squirrelmail
  DocumentRoot /var/lib/roundcube
      
  # begin squirrel config
  <Directory /usr/share/squirrelmail>
    Options Indexes FollowSymLinks
    <IfModule mod_php4.c>
      php_flag register_globals off
    </IfModule>
    <IfModule mod_php5.c>
      php_flag register_globals off
    </IfModule>
    <IfModule mod_dir.c>
      DirectoryIndex index.php
    </IfModule>
  
    # access to configtest is limited by default to prevent information leak
    <Files configtest.php>
      order deny,allow
      deny from all
      allow from 127.0.0.1
    </Files>
  </Directory>
  # end squirrel config

  # begin roundcube config
  # Access to tinymce files
  Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
  Alias /roundcube /var/lib/roundcube

  <Directory "/usr/share/tinymce/www/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order allow,deny
        allow from all
  </Directory>
  
  <Directory /var/lib/roundcube/>
    Options +FollowSymLinks
    # This is needed to parse /var/lib/roundcube/.htaccess. See its
    # content before setting AllowOverride to None.
    AllowOverride All
    order allow,deny
    allow from all
  </Directory>
  
  # Protecting basic directories:
  <Directory /var/lib/roundcube/config>
          Options -FollowSymLinks
          AllowOverride None
  </Directory>
  
  <Directory /var/lib/roundcube/temp>
          Options -FollowSymLinks
          AllowOverride None
          Order allow,deny
          Deny from all
  </Directory>
  
  <Directory /var/lib/roundcube/logs>
          Options -FollowSymLinks
          AllowOverride None
          Order allow,deny
          Deny from all
  </Directory>  
  # end roundcube config

</VirtualHost>
# end vhost for mail.<%= domain >