[fix] roundcube and squirrelmail are specific packages

This commit is contained in:
Benjamin Sonntag 2018-06-23 16:47:15 +02:00
parent a2e22a8d1f
commit bafee6372a
4 changed files with 45 additions and 119 deletions

View File

@ -1,68 +0,0 @@
<Virtualhost *:80>
ServerName %%fqdn%%
AssignUserId #%%UID%% #%%GID%%
SetEnv LOGIN "%%UID%%-%%LOGIN%%"
KeepAlive Off
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !/cgi-bin/
RewriteCond %{REQUEST_FILENAME} !/.well-known/acme-challenge/
RewriteRule ^/(.*)$ https://%%fqdn%%/$1 [R=301,L]
</Virtualhost>
<VirtualHost *:443>
ServerName %%fqdn%%
AssignUserId www-data www-data
SetEnv LOGIN "0000-roundcube"
DocumentRoot /var/lib/roundcube
# Access to tinymce files
<Directory "/usr/share/tinymce/www/">
Options +Indexes +MultiViews +FollowSymLinks
AllowOverride None
Require all granted
</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
Require all granted
</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>
Alias /javascript /usr/share/javascript/
<Directory "/usr/share/javascript/">
Options +FollowSymLinks +MultiViews
Require all granted
</Directory>
SSLEngine On
SSLCertificateFile %%CRT%%
SSLCertificateKeyFile %%KEY%%
%%CHAINLINE%%
</VirtualHost>

View File

@ -1,39 +0,0 @@
<Virtualhost *:80>
ServerName %%fqdn%%
AssignUserId #%%UID%% #%%GID%%
SetEnv LOGIN "%%UID%%-%%LOGIN%%"
KeepAlive Off
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !/cgi-bin/
RewriteCond %{REQUEST_FILENAME} !/.well-known/acme-challenge/
RewriteRule ^/(.*)$ https://%%fqdn%%/$1 [R=301,L]
</Virtualhost>
<VirtualHost *:443>
ServerName %%fqdn%%
AssignUserId alternc-squirrelmail nogroup
SetEnv LOGIN "%%UID%%-%%LOGIN%%"
DocumentRoot /usr/share/squirrelmail
<Directory /usr/share/squirrelmail>
php_value open_basedir /usr/share/squirrelmail:/etc/squirrelmail/:/var/lib/squirrelmail/data/:/var/spool/squirrelmail/:/etc/mailname
php_admin_flag safe_mode off
Options +Indexes +FollowSymLinks
</Directory>
Alias /javascript /usr/share/javascript/
<Directory "/usr/share/javascript/">
Options +FollowSymLinks +MultiViews
Order allow,deny
Allow from all
</Directory>
SSLEngine On
SSLCertificateFile %%CRT%%
SSLCertificateKeyFile %%KEY%%
%%CHAINLINE%%
</VirtualHost>

View File

@ -1,4 +1,17 @@
<VirtualHost *:80> <Virtualhost *:80>
ServerName %%fqdn%%
AssignUserId #%%UID%% #%%GID%%
SetEnv LOGIN "%%UID%%-%%LOGIN%%"
KeepAlive Off
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !/cgi-bin/
RewriteCond %{REQUEST_FILENAME} !/.well-known/acme-challenge/
RewriteRule ^/(.*)$ https://%%fqdn%%/$1 [R=301,L]
</Virtualhost>
<VirtualHost *:443>
ServerName %%fqdn%% ServerName %%fqdn%%
AssignUserId www-data www-data AssignUserId www-data www-data
SetEnv LOGIN "0000-roundcube" SetEnv LOGIN "0000-roundcube"
@ -7,10 +20,9 @@
# Access to tinymce files # Access to tinymce files
<Directory "/usr/share/tinymce/www/"> <Directory "/usr/share/tinymce/www/">
Options Indexes MultiViews FollowSymLinks Options +Indexes +MultiViews +FollowSymLinks
AllowOverride None AllowOverride None
Order allow,deny Require all granted
allow from all
</Directory> </Directory>
<Directory /var/lib/roundcube/> <Directory /var/lib/roundcube/>
@ -18,8 +30,7 @@
# This is needed to parse /var/lib/roundcube/.htaccess. See its # This is needed to parse /var/lib/roundcube/.htaccess. See its
# content before setting AllowOverride to None. # content before setting AllowOverride to None.
AllowOverride All AllowOverride All
order allow,deny Require all granted
allow from all
</Directory> </Directory>
# Protecting basic directories: # Protecting basic directories:
@ -45,9 +56,13 @@
Alias /javascript /usr/share/javascript/ Alias /javascript /usr/share/javascript/
<Directory "/usr/share/javascript/"> <Directory "/usr/share/javascript/">
Options FollowSymLinks MultiViews Options +FollowSymLinks +MultiViews
Order allow,deny Require all granted
Allow from all
</Directory> </Directory>
SSLEngine On
SSLCertificateFile %%CRT%%
SSLCertificateKeyFile %%KEY%%
%%CHAINLINE%%
</VirtualHost> </VirtualHost>

View File

@ -1,4 +1,17 @@
<VirtualHost *:80> <Virtualhost *:80>
ServerName %%fqdn%%
AssignUserId #%%UID%% #%%GID%%
SetEnv LOGIN "%%UID%%-%%LOGIN%%"
KeepAlive Off
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !/cgi-bin/
RewriteCond %{REQUEST_FILENAME} !/.well-known/acme-challenge/
RewriteRule ^/(.*)$ https://%%fqdn%%/$1 [R=301,L]
</Virtualhost>
<VirtualHost *:443>
ServerName %%fqdn%% ServerName %%fqdn%%
AssignUserId alternc-squirrelmail nogroup AssignUserId alternc-squirrelmail nogroup
SetEnv LOGIN "%%UID%%-%%LOGIN%%" SetEnv LOGIN "%%UID%%-%%LOGIN%%"
@ -7,15 +20,20 @@
<Directory /usr/share/squirrelmail> <Directory /usr/share/squirrelmail>
php_value open_basedir /usr/share/squirrelmail:/etc/squirrelmail/:/var/lib/squirrelmail/data/:/var/spool/squirrelmail/:/etc/mailname php_value open_basedir /usr/share/squirrelmail:/etc/squirrelmail/:/var/lib/squirrelmail/data/:/var/spool/squirrelmail/:/etc/mailname
php_admin_flag safe_mode off php_admin_flag safe_mode off
Options Indexes FollowSymLinks Options +Indexes +FollowSymLinks
</Directory> </Directory>
Alias /javascript /usr/share/javascript/ Alias /javascript /usr/share/javascript/
<Directory "/usr/share/javascript/"> <Directory "/usr/share/javascript/">
Options FollowSymLinks MultiViews Options +FollowSymLinks +MultiViews
Order allow,deny Order allow,deny
Allow from all Allow from all
</Directory> </Directory>
SSLEngine On
SSLCertificateFile %%CRT%%
SSLCertificateKeyFile %%KEY%%
%%CHAINLINE%%
</VirtualHost> </VirtualHost>