Code:
<VirtualHost *:80>
ServerName midgard.local
DocumentRoot /var/lib/midgard/vhosts/midgard.local/80
<Directory /var/lib/midgard/vhosts/midgard.local/80>
Options +SymLinksIfOwnerMatch
Allow from all
</Directory>
<Directory /var/lib/midgard/vhosts/midgard.local/80/midcom-static>
Options -Indexes
<FilesMatch "\.(php)$">
Deny from all
</FilesMatch>
MidgardEngine Off
</Directory>
<Directory /var/lib/midgard/vhosts/midgard.local/80/midcom-static/midcom.helper.datamanager2/fckeditor>
<FilesMatch "\.(php)$">
Allow from all
</FilesMatch>
</Directory>
MidgardBlobDir /var/lib/midgard/blobs/midgard
<Directory /var/lib/midgard/blobs/midgard>
Allow from all
</Directory>
MidgardEngine on
# You may uncomment this line and comment next two to disable caching facility.
#MidgardRootfile /usr/lib/apache2/modules/midgard-root-nommp.php
MidgardPageCacheDir /var/cache/midgard/midgard
MidgardRootFile /usr/lib/apache2/modules/midgard-root.php
<Directory /var/cache/midgard>
Allow from all
</Directory>
MidgardDefaultRealm "Midgard"
MidgardDatabase midgard midgard midgard
RLimitCPU 20 60
RLimitMem 67108864 134217728
<Directory /usr/share/php/midcom/static>
Allow from all
</Directory>
# Global virtual host level PHP settings for all Midgard applications
#
# Required for uploading attachments
php_admin_flag file_uploads On
# Required by majority of the Midgard PHP applications
php_flag magic_quotes_gpc Off
# Required by MidCOM <= 1.4 (comment this out with newer releases)
#php_flag short_open_tag On
# Recommended at least for MidCOM AIS (20M is the minimum requirement)
# (change and enable if you want to set different value than in php.ini)
php_value memory_limit 20M
# Maximum size of POST data (affects attachment uploads)
# (change and enable if you want to set different value than in php.ini)
php_value post_max_size 50M
# Maximum size for uploaded files (affects attachment uploads)
# (change and enable if you want to set different value than in php.ini)
php_value upload_max_filesize 50M
# Required by midcom-template
php_flag register_globals On
# Location specific PHP settings for certain Midgard applications
#
<Location /spider-admin>
php_flag register_globals On
</Location>
<Location /aegir>
php_flag short_open_tag On
php_flag register_globals On
</Location>
AddDefaultCharset utf-8
# Uncomment if you want to redirect all midcom-admin requests to
# secured host. Keep in mind that mod_rewrite module is mandatory
# and should be loaded in Apache configuration.
# More docs about configuration may be found at:
# http://www.midgard-project.org/midcom-permalink-ebfd755b5fc58087bc4f5771585c63eb
# --- SSL rewrite Start ---
#RewriteEngine On
#RewriteCond %{REQUEST_URI} !^/midcom-admin.*
#RewriteCond %{REQUEST_URI} !^/midcom-static.*
#RewriteCond %{REQUEST_URI} !\.(gif|jpg|css|ico)$
#RewriteRule /(.*)$ http://midgard.local/
#RewriteEngine On
#RewriteCond %{REQUEST_URI} ^/midcom-admin.*
#RewriteRule /(.*)$ https://midgard.local/
# --- SSL rewrite End ---
</VirtualHost>