2014-05-08 16:59:35 +00:00
|
|
|
from django.conf import settings
|
|
|
|
|
2015-04-05 22:34:47 +00:00
|
|
|
from orchestra.settings import ORCHESTRA_BASE_DOMAIN
|
2015-03-31 12:39:08 +00:00
|
|
|
|
2014-05-08 16:59:35 +00:00
|
|
|
|
2015-03-11 16:32:33 +00:00
|
|
|
WEBAPPS_BASE_ROOT = getattr(settings, 'WEBAPPS_BASE_ROOT',
|
2015-03-31 12:39:08 +00:00
|
|
|
'%(home)s/webapps/%(app_name)s/'
|
|
|
|
)
|
2015-03-11 16:32:33 +00:00
|
|
|
|
2014-05-08 16:59:35 +00:00
|
|
|
|
2015-03-10 11:46:48 +00:00
|
|
|
WEBAPPS_FPM_LISTEN = getattr(settings, 'WEBAPPS_FPM_LISTEN',
|
2015-03-10 16:57:23 +00:00
|
|
|
# '127.0.0.1:9%(app_id)03d
|
|
|
|
'/opt/php/5.4/socks/%(user)s-%(app_name)s.sock'
|
2015-03-10 11:46:48 +00:00
|
|
|
)
|
2014-10-14 13:50:19 +00:00
|
|
|
|
2015-04-09 14:32:10 +00:00
|
|
|
WEBAPPS_FPM_DEFAULT_MAX_CHILDREN = getattr(settings, 'WEBAPPS_FPM_DEFAULT_MAX_CHILDREN',
|
|
|
|
3
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2014-10-14 13:50:19 +00:00
|
|
|
WEBAPPS_PHPFPM_POOL_PATH = getattr(settings, 'WEBAPPS_PHPFPM_POOL_PATH',
|
2015-03-10 16:57:23 +00:00
|
|
|
'/etc/php5/fpm/pool.d/%(user)s-%(app_name)s.conf')
|
2014-10-14 13:50:19 +00:00
|
|
|
|
|
|
|
|
2015-03-11 16:32:33 +00:00
|
|
|
WEBAPPS_FCGID_WRAPPER_PATH = getattr(settings, 'WEBAPPS_FCGID_WRAPPER_PATH',
|
2015-03-25 15:45:04 +00:00
|
|
|
# Inside SuExec Document root
|
2015-04-14 14:29:22 +00:00
|
|
|
# Make sure all account wrappers are in the same DIR
|
2015-03-31 12:39:08 +00:00
|
|
|
'/home/httpd/fcgi-bin.d/%(user)s/%(app_name)s-wrapper'
|
|
|
|
)
|
2014-05-08 16:59:35 +00:00
|
|
|
|
|
|
|
|
2015-03-10 16:57:23 +00:00
|
|
|
WEBAPPS_FCGID_CMD_OPTIONS_PATH = getattr(settings, 'WEBAPPS_FCGID_CMD_OPTIONS_PATH',
|
2015-03-11 16:32:33 +00:00
|
|
|
# Loaded by Apache
|
2015-03-31 12:39:08 +00:00
|
|
|
'/etc/apache2/fcgid-conf/%(user)s-%(app_name)s.conf'
|
|
|
|
)
|
2015-03-10 16:57:23 +00:00
|
|
|
|
|
|
|
|
2015-04-02 16:14:55 +00:00
|
|
|
# Greater or equal to your FcgidMaxRequestsPerProcess
|
|
|
|
# http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#examples
|
|
|
|
WEBAPPS_PHP_MAX_REQUESTS = getattr(settings, 'WEBAPPS_PHP_MAX_REQUESTS',
|
|
|
|
400
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2015-03-10 16:57:23 +00:00
|
|
|
WEBAPPS_PHP_ERROR_LOG_PATH = getattr(settings, 'WEBAPPS_PHP_ERROR_LOG_PATH',
|
2015-03-31 12:39:08 +00:00
|
|
|
''
|
|
|
|
)
|
2015-03-10 16:57:23 +00:00
|
|
|
|
2015-03-12 14:05:23 +00:00
|
|
|
|
2015-03-20 15:13:08 +00:00
|
|
|
WEBAPPS_MERGE_PHP_WEBAPPS = getattr(settings, 'WEBAPPS_MERGE_PHP_WEBAPPS',
|
|
|
|
# Combine all fcgid-wrappers/fpm-pools into one per account-php_version
|
|
|
|
# to better control num processes per account and save memory
|
|
|
|
False)
|
|
|
|
|
|
|
|
|
2015-03-04 21:06:16 +00:00
|
|
|
WEBAPPS_TYPES = getattr(settings, 'WEBAPPS_TYPES', (
|
2015-04-05 10:46:24 +00:00
|
|
|
'orchestra.contrib.webapps.types.php.PHPApp',
|
|
|
|
'orchestra.contrib.webapps.types.misc.StaticApp',
|
|
|
|
'orchestra.contrib.webapps.types.misc.WebalizerApp',
|
|
|
|
'orchestra.contrib.webapps.types.misc.SymbolicLinkApp',
|
|
|
|
'orchestra.contrib.webapps.types.wordpress.WordPressApp',
|
2015-03-11 16:32:33 +00:00
|
|
|
))
|
|
|
|
|
|
|
|
|
2015-03-12 14:05:23 +00:00
|
|
|
WEBAPPS_PHP_VERSIONS = getattr(settings, 'WEBAPPS_PHP_VERSIONS', (
|
2015-03-16 16:52:41 +00:00
|
|
|
# Execution modle choose by ending -fpm or -cgi
|
|
|
|
('5.4-fpm', 'PHP 5.4 FPM'),
|
|
|
|
('5.4-cgi', 'PHP 5.4 FCGID'),
|
|
|
|
('5.3-cgi', 'PHP 5.3 FCGID'),
|
|
|
|
('5.2-cgi', 'PHP 5.2 FCGID'),
|
|
|
|
('4-cgi', 'PHP 4 FCGID'),
|
2015-03-04 21:06:16 +00:00
|
|
|
))
|
|
|
|
|
2015-03-11 16:32:33 +00:00
|
|
|
|
2015-03-12 14:05:23 +00:00
|
|
|
WEBAPPS_DEFAULT_PHP_VERSION = getattr(settings, 'WEBAPPS_DEFAULT_PHP_VERSION',
|
2015-03-31 12:39:08 +00:00
|
|
|
'5.4-cgi'
|
|
|
|
)
|
2015-03-11 16:32:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
WEBAPPS_PHP_CGI_BINARY_PATH = getattr(settings, 'WEBAPPS_PHP_CGI_BINARY_PATH',
|
|
|
|
# Path of the cgi binary used by fcgid
|
2015-03-31 12:39:08 +00:00
|
|
|
'/usr/bin/php%(php_version_number)s-cgi'
|
|
|
|
)
|
2015-03-11 16:32:33 +00:00
|
|
|
|
|
|
|
|
2015-03-12 14:05:23 +00:00
|
|
|
WEBAPPS_PHP_CGI_RC_DIR = getattr(settings, 'WEBAPPS_PHP_CGI_RC_DIR',
|
|
|
|
# Path to php.ini
|
2015-03-31 12:39:08 +00:00
|
|
|
'/etc/php%(php_version_number)s/cgi/'
|
|
|
|
)
|
2015-03-11 16:32:33 +00:00
|
|
|
|
|
|
|
|
2015-03-12 14:05:23 +00:00
|
|
|
WEBAPPS_PHP_CGI_INI_SCAN_DIR = getattr(settings, 'WEBAPPS_PHP_CGI_INI_SCAN_DIR',
|
|
|
|
# Path to php.ini
|
2015-03-31 12:39:08 +00:00
|
|
|
'/etc/php%(php_version_number)s/cgi/conf.d'
|
|
|
|
)
|
2015-03-11 16:32:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-10 16:57:23 +00:00
|
|
|
WEBAPPS_UNDER_CONSTRUCTION_PATH = getattr(settings, 'WEBAPPS_UNDER_CONSTRUCTION_PATH',
|
|
|
|
# Server-side path where a under construction stock page is
|
|
|
|
# '/var/www/undercontruction/index.html',
|
2015-03-31 12:39:08 +00:00
|
|
|
''
|
|
|
|
)
|
|
|
|
|
2015-03-10 11:46:48 +00:00
|
|
|
|
2015-03-04 21:06:16 +00:00
|
|
|
#WEBAPPS_TYPES_OVERRIDE = getattr(settings, 'WEBAPPS_TYPES_OVERRIDE', {})
|
2015-04-02 16:14:55 +00:00
|
|
|
#for webapp_type, value in WEBAPPS_TYPES_OVERRIDE.items():
|
2015-03-04 21:06:16 +00:00
|
|
|
# if value is None:
|
|
|
|
# WEBAPPS_TYPES.pop(webapp_type, None)
|
|
|
|
# else:
|
|
|
|
# WEBAPPS_TYPES[webapp_type] = value
|
2014-10-30 16:34:02 +00:00
|
|
|
|
|
|
|
|
2015-04-10 15:03:38 +00:00
|
|
|
|
2014-11-10 15:03:34 +00:00
|
|
|
WEBAPPS_PHP_DISABLED_FUNCTIONS = getattr(settings, 'WEBAPPS_PHP_DISABLED_FUNCTION', [
|
|
|
|
'exec',
|
|
|
|
'passthru',
|
|
|
|
'shell_exec',
|
|
|
|
'system',
|
|
|
|
'proc_open',
|
|
|
|
'popen',
|
|
|
|
'curl_exec',
|
|
|
|
'curl_multi_exec',
|
|
|
|
'show_source',
|
|
|
|
'pcntl_exec',
|
|
|
|
'proc_close',
|
|
|
|
'proc_get_status',
|
|
|
|
'proc_nice',
|
|
|
|
'proc_terminate',
|
|
|
|
'ini_alter',
|
|
|
|
'virtual',
|
|
|
|
'openlog',
|
|
|
|
'escapeshellcmd',
|
|
|
|
'escapeshellarg',
|
|
|
|
'dl'
|
|
|
|
])
|
|
|
|
|
|
|
|
|
2015-03-04 21:06:16 +00:00
|
|
|
WEBAPPS_ENABLED_OPTIONS = getattr(settings, 'WEBAPPS_ENABLED_OPTIONS', (
|
2015-04-05 10:46:24 +00:00
|
|
|
'orchestra.contrib.webapps.options.PublicRoot',
|
|
|
|
'orchestra.contrib.webapps.options.Timeout',
|
|
|
|
'orchestra.contrib.webapps.options.Processes',
|
2015-04-13 14:46:10 +00:00
|
|
|
'orchestra.contrib.webapps.options.PHPEnableFunctions',
|
2015-04-05 10:46:24 +00:00
|
|
|
'orchestra.contrib.webapps.options.PHPAllowURLInclude',
|
|
|
|
'orchestra.contrib.webapps.options.PHPAllowURLFopen',
|
|
|
|
'orchestra.contrib.webapps.options.PHPAutoAppendFile',
|
|
|
|
'orchestra.contrib.webapps.options.PHPAutoPrependFile',
|
|
|
|
'orchestra.contrib.webapps.options.PHPDateTimeZone',
|
|
|
|
'orchestra.contrib.webapps.options.PHPDefaultSocketTimeout',
|
|
|
|
'orchestra.contrib.webapps.options.PHPDisplayErrors',
|
|
|
|
'orchestra.contrib.webapps.options.PHPExtension',
|
|
|
|
'orchestra.contrib.webapps.options.PHPMagicQuotesGPC',
|
|
|
|
'orchestra.contrib.webapps.options.PHPMagicQuotesRuntime',
|
|
|
|
'orchestra.contrib.webapps.options.PHPMaginQuotesSybase',
|
|
|
|
'orchestra.contrib.webapps.options.PHPMaxInputTime',
|
|
|
|
'orchestra.contrib.webapps.options.PHPMaxInputVars',
|
|
|
|
'orchestra.contrib.webapps.options.PHPMemoryLimit',
|
|
|
|
'orchestra.contrib.webapps.options.PHPMySQLConnectTimeout',
|
|
|
|
'orchestra.contrib.webapps.options.PHPOutputBuffering',
|
|
|
|
'orchestra.contrib.webapps.options.PHPRegisterGlobals',
|
|
|
|
'orchestra.contrib.webapps.options.PHPPostMaxSize',
|
|
|
|
'orchestra.contrib.webapps.options.PHPSendmailPath',
|
|
|
|
'orchestra.contrib.webapps.options.PHPSessionBugCompatWarn',
|
|
|
|
'orchestra.contrib.webapps.options.PHPSessionAutoStart',
|
|
|
|
'orchestra.contrib.webapps.options.PHPSafeMode',
|
|
|
|
'orchestra.contrib.webapps.options.PHPSuhosinPostMaxVars',
|
|
|
|
'orchestra.contrib.webapps.options.PHPSuhosinGetMaxVars',
|
|
|
|
'orchestra.contrib.webapps.options.PHPSuhosinRequestMaxVars',
|
|
|
|
'orchestra.contrib.webapps.options.PHPSuhosinSessionEncrypt',
|
|
|
|
'orchestra.contrib.webapps.options.PHPSuhosinSimulation',
|
|
|
|
'orchestra.contrib.webapps.options.PHPSuhosinExecutorIncludeWhitelist',
|
|
|
|
'orchestra.contrib.webapps.options.PHPUploadMaxFileSize',
|
|
|
|
'orchestra.contrib.webapps.options.PHPZendExtension',
|
2015-03-04 21:06:16 +00:00
|
|
|
))
|
2014-11-27 19:17:26 +00:00
|
|
|
|
|
|
|
|
2015-03-04 21:06:16 +00:00
|
|
|
WEBAPPS_DEFAULT_MYSQL_DATABASE_HOST = getattr(settings, 'WEBAPPS_DEFAULT_MYSQL_DATABASE_HOST',
|
2015-04-05 22:34:47 +00:00
|
|
|
'mysql.{}'.format(ORCHESTRA_BASE_DOMAIN)
|
2015-03-31 12:39:08 +00:00
|
|
|
)
|
2015-04-09 14:32:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
WEBAPPS_MOVE_ON_DELETE_PATH = getattr(settings, 'WEBAPPS_MOVE_ON_DELETE_PATH',
|
|
|
|
''
|
|
|
|
)
|