2014-05-08 16:59:35 +00:00
|
|
|
from django.conf import settings
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
|
|
|
|
|
|
|
WEBSITES_PORT_CHOICES = getattr(settings, 'WEBSITES_PORT_CHOICES', (
|
|
|
|
(80, 'HTTP'),
|
|
|
|
(443, 'HTTPS'),
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
WEBSITES_DEFAULT_PORT = getattr(settings, 'WEBSITES_DEFAULT_PORT', 80)
|
|
|
|
|
|
|
|
|
2014-10-17 15:26:00 +00:00
|
|
|
WEBSITES_DEFAULT_IP = getattr(settings, 'WEBSITES_DEFAULT_IP', '*')
|
2014-10-17 15:23:02 +00:00
|
|
|
|
|
|
|
|
2014-05-08 16:59:35 +00:00
|
|
|
WEBSITES_DOMAIN_MODEL = getattr(settings, 'WEBSITES_DOMAIN_MODEL', 'domains.Domain')
|
|
|
|
|
|
|
|
|
|
|
|
WEBSITES_OPTIONS = getattr(settings, 'WEBSITES_OPTIONS', {
|
|
|
|
# { name: ( verbose_name, validation_regex ) }
|
|
|
|
'directory_protection': (
|
|
|
|
_("HTTPD - Directory protection"),
|
|
|
|
r'^([\w/_]+)\s+(\".*\")\s+([\w/_\.]+)$'
|
|
|
|
),
|
2014-10-30 16:34:02 +00:00
|
|
|
'redirect': (
|
2014-05-08 16:59:35 +00:00
|
|
|
_("HTTPD - Redirection"),
|
2014-10-30 16:34:02 +00:00
|
|
|
r'^(permanent\s[^ ]+|[^ ]+)\s[^ ]+$'
|
2014-05-08 16:59:35 +00:00
|
|
|
),
|
2014-10-30 16:34:02 +00:00
|
|
|
'ssl_ca': (
|
|
|
|
_("HTTPD - SSL CA"),
|
|
|
|
r'^[^ ]+$'
|
|
|
|
),
|
|
|
|
'ssl_cert': (
|
|
|
|
_("HTTPD - SSL cert"),
|
|
|
|
r'^[^ ]+$'
|
|
|
|
),
|
|
|
|
'ssl_key': (
|
|
|
|
_("HTTPD - SSL key"),
|
|
|
|
r'^[^ ]+$'
|
2014-05-08 16:59:35 +00:00
|
|
|
),
|
|
|
|
'sec_rule_remove': (
|
|
|
|
_("HTTPD - SecRuleRemoveById"),
|
2014-10-30 16:34:02 +00:00
|
|
|
r'^[0-9\s]+$'
|
2014-05-08 16:59:35 +00:00
|
|
|
),
|
2014-10-30 16:34:02 +00:00
|
|
|
'sec_engine': (
|
2014-05-08 16:59:35 +00:00
|
|
|
_("HTTPD - Disable Modsecurity"),
|
|
|
|
r'^[\w/_]+$'
|
|
|
|
),
|
2014-11-09 10:16:07 +00:00
|
|
|
'user_group': (
|
|
|
|
_("HTTPD - SuexecUserGroup"),
|
|
|
|
r'^[\w/_]+\s[\w/_]+$'
|
|
|
|
),
|
2014-05-08 16:59:35 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
WEBSITES_BASE_APACHE_CONF = getattr(settings, 'WEBSITES_BASE_APACHE_CONF',
|
|
|
|
'/etc/apache2/')
|
|
|
|
|
2014-10-17 20:03:41 +00:00
|
|
|
|
2014-05-08 16:59:35 +00:00
|
|
|
WEBSITES_WEBALIZER_PATH = getattr(settings, 'WEBSITES_WEBALIZER_PATH',
|
|
|
|
'/home/httpd/webalizer/')
|
|
|
|
|
|
|
|
|
2014-10-27 14:31:04 +00:00
|
|
|
WEBSITES_WEBSITE_WWW_LOG_PATH = getattr(settings, 'WEBSITES_WEBSITE_WWW_LOG_PATH',
|
|
|
|
'/var/log/apache2/virtual/%(unique_name)s')
|