Mini Shell

Direktori : /opt/imh-python/lib/python3.9/site-packages/ngxconf/
Upload File :
Current File : //opt/imh-python/lib/python3.9/site-packages/ngxconf/__init__.py

# vim: set ts=4 sw=4 expandtab syntax=python:
"""

ngxconf
Nginx user configuration builder for cPanel

Copyright (c) 2017-2021 InMotion Hosting, Inc.
http://www.inmotionhosting.com/

@author J. Hipps <jacobh@inmotionhosting.com>, S. Combs <seanc@inmotionhosting.com>

"""
# pylint: disable=invalid-name

__version__ = "2.4.21"
__date__ = "08 Jul 2024"


## Base user configuration
gconf_defaults = {
                    'enable_fpm': True,
                    'enforce_fpm_limits': False,
                    'fallback_phpver': "ea-php74",
                    'chained_cert_path': "/var/nginx/certs",
                    'cache_base_path': "/var/nginx/cache",
                    'nginx_vhost_path': "/etc/nginx/vhosts",
                    'nginx_user': "nginx",
                    'nginx_group': "nobody",
                    'template_basepath': "/opt/ngxconf/templates",
                    'cache_key_format': "$scheme$request_method$host$request_uri",
                    'tls_cipher_list': "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256",
                    'manage_tls_options': False,
                    'apply_user_default_config': False,
                    'user_default_override_local': False,
                    'allow_user_includes': False,
                    'enable_catchall': True,
                    'use_ratelimit_whitelist': False,
                    'restrict_purge': False,
                    'cpanel_host_redirect': "$hostname",
                    'httpd_pidfile': "/var/run/apache2/httpd.pid",
                    'fpm_management': "cpanel",
                    'fpm_master_density': 1,
                    'fpm_socket_path': "/var/ngxconf/phpfpm/sock",
                    'fpm_pid_path': "/var/ngxconf/phpfpm/pid",
                    'fpm_conf_path': "/opt/ngxconf/phpfpm/conf.d",
                    'fpm_cache_path': "/var/ngxconf/cache",
                    'fpm_worker_rlimit_files': 4096,
                    'supervisord_conf_path': "/opt/ngxconf/supervisord/conf.d",
                    'fpm_versions': {
                        'ea-php54': "/opt/cpanel/ea-php54/root/usr/sbin/php-fpm",
                        'ea-php55': "/opt/cpanel/ea-php55/root/usr/sbin/php-fpm",
                        'ea-php56': "/opt/cpanel/ea-php56/root/usr/sbin/php-fpm",
                        'ea-php70': "/opt/cpanel/ea-php70/root/usr/sbin/php-fpm",
                        'ea-php71': "/opt/cpanel/ea-php71/root/usr/sbin/php-fpm",
                        'ea-php72': "/opt/cpanel/ea-php72/root/usr/sbin/php-fpm",
                        'ea-php73': "/opt/cpanel/ea-php73/root/usr/sbin/php-fpm",
                        'ea-php74': "/opt/cpanel/ea-php74/root/usr/sbin/php-fpm",
                        'ea-php80': "/opt/cpanel/ea-php80/root/usr/sbin/php-fpm",
                        'ea-php81': "/opt/cpanel/ea-php81/root/usr/sbin/php-fpm",
                        'ea-php82': "/opt/cpanel/ea-php82/root/usr/sbin/php-fpm",
                        'ea-php83': "/opt/cpanel/ea-php83/root/usr/sbin/php-fpm",
                    },
                    'fpm_master_config': {
                        'process_control_timeout': 5,
                        'rlimit_files': 8192,
                        'log_level': "notice",
                        'error_log_path': "/var/ngxconf/phpfpm/logs",
                        'max_execution_time': "90",
                        'opcache_memory': "512",
                        'opcache_interned_strings_memory': "16",
                        'opcache_max_files': "16536",
                        'opcache_revalidate_freq': "90",
                        'max_spare_servers': "5",
                        'restrict_opcache_status': True,
                    }
                  }

default_header = \
"""
# vim: set ts=2 sw=2 expandtab syntax=yaml:
# Default user configuration
---
"""

default_conf = {
                'pass_all': False,
                'proxy_proto': "http",
                'cache_time_default': 14400,
                'cache_time_modsec': 0,
                'cache_time_404': 10,
                'cache_lock_enable': True,
                'cache_convert_head': True,
                'cache_honor_cc': False,
                'cache_honor_expires': False,
                'cache_honor_cookies': True,
                'cache_bypass_paths': [
                                        ".*/wp-admin",
                                        ".*/administrator",
                                        "/admin",
                                        "/user",
                                        ".*/wp-cron\\.php",
                                        "/.*login\\.php",
                                        "/opcache\\.php",
                                        ".*/xmlrpc\\.php",
                                        ".*/phpinfo\\.php",
                                        "/basket.*",
                                        "/cart.*",
                                        "/my-account.*",
                                        "/checkout.*",
                                        "/addons.*"
                                      ],
                'bypass_cookies': [
                                    '_logged_in_',
                                    'items_in_cart',
                                    'jsid'
                                  ],
                'fast_sending': False,
                'gzip': 3,
                'brotli': 4,
                'accel_static_content': False,
                'static_content_paths': [
                                            "/wp-content/uploads",
                                        ],
                'force_passthru': [],
                'ratelimit': 15,
                'ratelimit_paths': [
                                    "/.*login\\.php",
                                    ".*/xmlrpc\\.php",
                                    ".*/wp-cron\\.php"
                                   ],
                'ssl_enabled': False,
                'ssl_certificate': None,
                'ssl_certificate_key': None,
                'enable_hsts': False,
                'enable_http2': True,
                'force_https': False,
                'enable_tlsv1': False,
                'enable_tlsv1_1': False,
                'allow_compat_ciphers': False,
                'set_default': False,
               }

Zerion Mini Shell 1.0