apache2-sites/calcms.conf: add configuration
This commit is contained in:
@@ -51,82 +51,11 @@ install mod_perl2
|
|||||||
|
|
||||||
### Apache Configuration
|
### Apache Configuration
|
||||||
|
|
||||||
Virtual host configuration has to be placed at /etc/conf/apache2/.
|
Copy Virtual host configuration apache2-sites/calcms.conf to /etc/conf/apache2/sites-enabled/.
|
||||||
|
|
||||||
# adopt your settings here
|
|
||||||
Define domain your-domain.org
|
|
||||||
Define base_dir /home/calcms
|
|
||||||
Define perl_lib /home/radio/calcms
|
|
||||||
|
|
||||||
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
|
* setup domain
|
||||||
LogLevel info
|
* setup database connection
|
||||||
|
* setup directories
|
||||||
# limit redirection on injecting into your website
|
|
||||||
LimitInternalRecursion 4
|
|
||||||
|
|
||||||
# redirect HTTP to HTTPS,
|
|
||||||
# only needed for HTTP configuration, do not use this at HTTPS configuration(!)
|
|
||||||
Redirect permanent /agenda/planung https://${domain}/agenda/planung
|
|
||||||
|
|
||||||
# inject calcms into your website
|
|
||||||
Alias /agenda ${base_dir}/website/agenda
|
|
||||||
Alias /programm ${base_dir}/website/programm
|
|
||||||
Alias /agenda_files ${base_dir}/website/agenda_files
|
|
||||||
|
|
||||||
<Directory ${base_dir}/website/agenda>
|
|
||||||
AllowOverride All
|
|
||||||
Options -Indexes +FollowSymLinks +MultiViews +ExecCGI
|
|
||||||
Require all granted
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
<Directory ${base_dir}/website/programm>
|
|
||||||
AllowOverride All
|
|
||||||
Options -Indexes +FollowSymLinks -MultiViews -ExecCGI
|
|
||||||
Require all granted
|
|
||||||
|
|
||||||
<IfModule mod_rewrite.c>
|
|
||||||
RewriteBase /programm
|
|
||||||
|
|
||||||
RewriteEngine on
|
|
||||||
RewriteCond %{REQUEST_FILENAME} -f
|
|
||||||
RewriteRule (.*) $1 [L]
|
|
||||||
RewriteCond %{REQUEST_FILENAME} -d
|
|
||||||
RewriteRule (.*) $1 [L]
|
|
||||||
|
|
||||||
RewriteRule ^kalender/(\d{4}-\d{2}-\d{2})_(\d{4}-\d{2}-\d{2})\.html[\?]?(.*)$ /agenda/aggregate.cgi?from_date=$1&till_date=$2&$3 [L]
|
|
||||||
RewriteRule ^kalender/(\d{4}-\d{2}-\d{2})\.html[\?]?(.*)$ /agenda/aggregate.cgi?date=$1&$2 [L]
|
|
||||||
RewriteRule ^sendungen/(\d{4}-\d{2}-\d{2})\.html[\?]?(.*)$ /agenda/aggregate.cgi?date=$1&$2 [L]
|
|
||||||
RewriteRule ^sendung/(\d+)\.html[\?]?(.*)$ /agenda/aggregate.cgi?event_id=$1&$2 [L]
|
|
||||||
RewriteRule ^sendung/serie_plus/(\d+)\.html[\?]?(.*)$ /agenda/aggregate.cgi?next_series=$1&$2 [L]
|
|
||||||
RewriteRule ^sendung/serie_minus/(\d+)\.html[\?]?(.*)$ /agenda/aggregate.cgi?previous_series=$1&$2 [L]
|
|
||||||
</IfModule>
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
<Directory ${base_dir}/website/agenda_files>
|
|
||||||
AllowOverride All
|
|
||||||
Options -Indexes -FollowSymLinks -MultiViews -ExecCGI
|
|
||||||
Require all granted
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
<IfModule mod_perl.c>
|
|
||||||
PerlSetEnv LC_ALL en_US.UTF-8
|
|
||||||
PerlSetEnv LANGUAGE en_US.UTF-8
|
|
||||||
|
|
||||||
PerlWarn On
|
|
||||||
PerlModule ModPerl::RegistryPrefork
|
|
||||||
|
|
||||||
PerlModule Apache2::Reload
|
|
||||||
PerlInitHandler Apache2::Reload
|
|
||||||
|
|
||||||
# set local tmp dir
|
|
||||||
SetEnv TMPDIR ${base_dir}/tmp/
|
|
||||||
|
|
||||||
# set library directory
|
|
||||||
PerlSetEnv PERL5LIB ${base_dir}/lib/calcms/
|
|
||||||
|
|
||||||
# preload libraries
|
|
||||||
PerlPostConfigRequire ${base_dir}/lib/calcms/startup.pl
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
### install required perl modules
|
### install required perl modules
|
||||||
|
|
||||||
|
|||||||
74
install/apache2-sites/calcms.conf
Normal file
74
install/apache2-sites/calcms.conf
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
# adopt your settings here
|
||||||
|
Define domain your-domain.org
|
||||||
|
Define base_dir /home/calcms
|
||||||
|
Define perl_lib /home/radio/calcms
|
||||||
|
|
||||||
|
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
|
||||||
|
LogLevel info
|
||||||
|
|
||||||
|
# limit redirection on injecting into your website
|
||||||
|
LimitInternalRecursion 4
|
||||||
|
|
||||||
|
# redirect HTTP to HTTPS,
|
||||||
|
# only needed for HTTP configuration, do not use this at HTTPS configuration(!)
|
||||||
|
Redirect permanent /agenda/planung https://${domain}/agenda/planung
|
||||||
|
|
||||||
|
# inject calcms into your website
|
||||||
|
Alias /agenda ${base_dir}/website/agenda
|
||||||
|
Alias /programm ${base_dir}/website/programm
|
||||||
|
Alias /agenda_files ${base_dir}/website/agenda_files
|
||||||
|
|
||||||
|
<Directory ${base_dir}/website/agenda>
|
||||||
|
AllowOverride All
|
||||||
|
Options -Indexes +FollowSymLinks +MultiViews +ExecCGI
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<Directory ${base_dir}/website/programm>
|
||||||
|
AllowOverride All
|
||||||
|
Options -Indexes +FollowSymLinks -MultiViews -ExecCGI
|
||||||
|
Require all granted
|
||||||
|
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteBase /programm
|
||||||
|
|
||||||
|
RewriteEngine on
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -f
|
||||||
|
RewriteRule (.*) $1 [L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -d
|
||||||
|
RewriteRule (.*) $1 [L]
|
||||||
|
|
||||||
|
RewriteRule ^kalender/(\d{4}-\d{2}-\d{2})_(\d{4}-\d{2}-\d{2})\.html[\?]?(.*)$ /agenda/aggregate.cgi?from_date=$1&till_date=$2&$3 [L]
|
||||||
|
RewriteRule ^kalender/(\d{4}-\d{2}-\d{2})\.html[\?]?(.*)$ /agenda/aggregate.cgi?date=$1&$2 [L]
|
||||||
|
RewriteRule ^sendungen/(\d{4}-\d{2}-\d{2})\.html[\?]?(.*)$ /agenda/aggregate.cgi?date=$1&$2 [L]
|
||||||
|
RewriteRule ^sendung/(\d+)\.html[\?]?(.*)$ /agenda/aggregate.cgi?event_id=$1&$2 [L]
|
||||||
|
RewriteRule ^sendung/serie_plus/(\d+)\.html[\?]?(.*)$ /agenda/aggregate.cgi?next_series=$1&$2 [L]
|
||||||
|
RewriteRule ^sendung/serie_minus/(\d+)\.html[\?]?(.*)$ /agenda/aggregate.cgi?previous_series=$1&$2 [L]
|
||||||
|
</IfModule>
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<Directory ${base_dir}/website/agenda_files>
|
||||||
|
AllowOverride All
|
||||||
|
Options -Indexes -FollowSymLinks -MultiViews -ExecCGI
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<IfModule mod_perl.c>
|
||||||
|
PerlSetEnv LC_ALL en_US.UTF-8
|
||||||
|
PerlSetEnv LANGUAGE en_US.UTF-8
|
||||||
|
|
||||||
|
PerlWarn On
|
||||||
|
PerlModule ModPerl::RegistryPrefork
|
||||||
|
|
||||||
|
PerlModule Apache2::Reload
|
||||||
|
PerlInitHandler Apache2::Reload
|
||||||
|
|
||||||
|
# set local tmp dir
|
||||||
|
SetEnv TMPDIR ${base_dir}/tmp/
|
||||||
|
|
||||||
|
# set library directory
|
||||||
|
PerlSetEnv PERL5LIB ${base_dir}/lib/calcms/
|
||||||
|
|
||||||
|
# preload libraries
|
||||||
|
PerlPostConfigRequire ${base_dir}/lib/calcms/startup.pl
|
||||||
|
</IfModule>
|
||||||
Reference in New Issue
Block a user