Source

django-swingcms / swingcms / apache / swingcms_apache_directives

<VirtualHost *:80>

    ServerAdmin mail@swingcms.net
    ServerName  www.swingcms.net
    ServerAlias *swingcms.net

    AllowEncodedSlashes Off

    LogLevel info
    LogFormat "%v %l %u %t \"%r\" %>s %b" commonvhost
    ErrorLog "|/usr/sbin/rotatelogs /var/log/apache2/swingcms_error.log%Y-%m-%d-%H_%M_%S 2M"
    CustomLog "|/usr/sbin/rotatelogs /var/log/apache2/swingcms_access.log%Y-%m-%d-%H_%M_%S 2M" commonvhost

    WSGIDaemonProcess yourdomain threads=1 processes=5 maximum-requests=1000 inactivity-timeout=172800 display-name=%{GROUP}
    WSGIProcessGroup yourdomain
    WSGIScriptAlias / /var/www/django-swingcms/swingcms/apache/handler.wsgi

    Alias /static/ /var/www/django-swingcms/swingcms/static/
    Alias /media/ /var/www/django-swingcms/swingcms/media/
    Alias /favicon.ico /var/www/django-swingcms/swingcms/static/favicon.ico
    Alias /robots.txt /var/www/django-swingcms/swingcms/static/robots.txt
    Alias /sitemap.xml /var/www/django-swingcms/swingcms/static/sitemap.xml

    <Directory /var/www/django-swingcms/swingcms>
        Order allow,deny
        Deny from all
    </Directory>

    <Directory /var/www/django-swingcms/swingcms/media>
        Order allow,deny
        Allow from all
    </Directory>

    <Directory /var/www/django-swingcms/swingcms/static>
        Options FollowSymLinks
        Order allow,deny
        Allow from all
    </Directory>

    <Directory /var/www/django-swingcms/swingcms/apache>
        Order allow,deny
        Allow from all
    </Directory>

</VirtualHost>