From cceb9837082926e2f2cc2a8dd22c8aaac58c111e Mon Sep 17 00:00:00 2001 From: Gorden Mende Date: Tue, 2 Nov 2021 11:26:43 +0100 Subject: [PATCH] saving uncommitted changes in /etc prior to apt run --- .etckeeper | 2 ++ nginx/conf.d/upstream.conf | 4 +++ .../50-mod-http-auth-pam.conf.removed | 1 - .../50-mod-http-dav-ext.conf.removed | 1 - .../50-mod-http-echo.conf.removed | 1 - .../50-mod-http-geoip.conf.removed | 1 - .../50-mod-http-image-filter.conf.removed | 1 - .../50-mod-http-subs-filter.conf.removed | 1 - .../50-mod-http-upstream-fair.conf.removed | 1 - .../50-mod-http-xslt-filter.conf.removed | 1 - .../modules-enabled/50-mod-mail.conf.removed | 1 - .../50-mod-stream.conf.removed | 1 - nginx/nginx.conf | 2 +- php/7.4/fpm/php.ini | 6 ++-- php/8.0/fpm/php-fpm.conf | 6 ++-- php/8.0/fpm/php.ini | 28 +++++++++---------- php/8.0/fpm/pool.d/www.conf | 12 ++++---- 17 files changed, 33 insertions(+), 37 deletions(-) create mode 100644 nginx/conf.d/upstream.conf delete mode 120000 nginx/modules-enabled/50-mod-http-auth-pam.conf.removed delete mode 120000 nginx/modules-enabled/50-mod-http-dav-ext.conf.removed delete mode 120000 nginx/modules-enabled/50-mod-http-echo.conf.removed delete mode 120000 nginx/modules-enabled/50-mod-http-geoip.conf.removed delete mode 120000 nginx/modules-enabled/50-mod-http-image-filter.conf.removed delete mode 120000 nginx/modules-enabled/50-mod-http-subs-filter.conf.removed delete mode 120000 nginx/modules-enabled/50-mod-http-upstream-fair.conf.removed delete mode 120000 nginx/modules-enabled/50-mod-http-xslt-filter.conf.removed delete mode 120000 nginx/modules-enabled/50-mod-mail.conf.removed delete mode 120000 nginx/modules-enabled/50-mod-stream.conf.removed diff --git a/.etckeeper b/.etckeeper index 847d020b..1bfa517c 100755 --- a/.etckeeper +++ b/.etckeeper @@ -40,6 +40,7 @@ mkdir -p './logwatch/scripts/services' mkdir -p './network/if-post-down.d' mkdir -p './network/if-pre-up.d' mkdir -p './network/interfaces.d' +mkdir -p './nginx/modules-enabled' mkdir -p './nginx/sites-available/.git/branches' mkdir -p './nginx/sites-available/.git/objects/info' mkdir -p './nginx/sites-available/.git/refs/tags' @@ -3899,6 +3900,7 @@ maybe chmod 0755 'nginx/conf.d' maybe chmod 0644 'nginx/conf.d/default.conf' maybe chmod 0644 'nginx/conf.d/status.conf' maybe chmod 0644 'nginx/conf.d/tls.conf' +maybe chmod 0644 'nginx/conf.d/upstream.conf' maybe chmod 0644 'nginx/fastcgi.conf' maybe chmod 0644 'nginx/fastcgi.conf.default' maybe chmod 0644 'nginx/fastcgi_params' diff --git a/nginx/conf.d/upstream.conf b/nginx/conf.d/upstream.conf new file mode 100644 index 00000000..65989bdc --- /dev/null +++ b/nginx/conf.d/upstream.conf @@ -0,0 +1,4 @@ +#upstream php-handler { +# #server 127.0.0.1:9000; +# server unix:/var/run/php/php8.0-fpm.sock; +#} diff --git a/nginx/modules-enabled/50-mod-http-auth-pam.conf.removed b/nginx/modules-enabled/50-mod-http-auth-pam.conf.removed deleted file mode 120000 index 2c9098d3..00000000 --- a/nginx/modules-enabled/50-mod-http-auth-pam.conf.removed +++ /dev/null @@ -1 +0,0 @@ -/usr/share/nginx/modules-available/mod-http-auth-pam.conf \ No newline at end of file diff --git a/nginx/modules-enabled/50-mod-http-dav-ext.conf.removed b/nginx/modules-enabled/50-mod-http-dav-ext.conf.removed deleted file mode 120000 index 4bcd08d4..00000000 --- a/nginx/modules-enabled/50-mod-http-dav-ext.conf.removed +++ /dev/null @@ -1 +0,0 @@ -/usr/share/nginx/modules-available/mod-http-dav-ext.conf \ No newline at end of file diff --git a/nginx/modules-enabled/50-mod-http-echo.conf.removed b/nginx/modules-enabled/50-mod-http-echo.conf.removed deleted file mode 120000 index 2ca55aa8..00000000 --- a/nginx/modules-enabled/50-mod-http-echo.conf.removed +++ /dev/null @@ -1 +0,0 @@ -/usr/share/nginx/modules-available/mod-http-echo.conf \ No newline at end of file diff --git a/nginx/modules-enabled/50-mod-http-geoip.conf.removed b/nginx/modules-enabled/50-mod-http-geoip.conf.removed deleted file mode 120000 index 390fab28..00000000 --- a/nginx/modules-enabled/50-mod-http-geoip.conf.removed +++ /dev/null @@ -1 +0,0 @@ -/usr/share/nginx/modules-available/mod-http-geoip.conf \ No newline at end of file diff --git a/nginx/modules-enabled/50-mod-http-image-filter.conf.removed b/nginx/modules-enabled/50-mod-http-image-filter.conf.removed deleted file mode 120000 index fa27cd31..00000000 --- a/nginx/modules-enabled/50-mod-http-image-filter.conf.removed +++ /dev/null @@ -1 +0,0 @@ -/usr/share/nginx/modules-available/mod-http-image-filter.conf \ No newline at end of file diff --git a/nginx/modules-enabled/50-mod-http-subs-filter.conf.removed b/nginx/modules-enabled/50-mod-http-subs-filter.conf.removed deleted file mode 120000 index 60fc893c..00000000 --- a/nginx/modules-enabled/50-mod-http-subs-filter.conf.removed +++ /dev/null @@ -1 +0,0 @@ -/usr/share/nginx/modules-available/mod-http-subs-filter.conf \ No newline at end of file diff --git a/nginx/modules-enabled/50-mod-http-upstream-fair.conf.removed b/nginx/modules-enabled/50-mod-http-upstream-fair.conf.removed deleted file mode 120000 index 2dc0c72e..00000000 --- a/nginx/modules-enabled/50-mod-http-upstream-fair.conf.removed +++ /dev/null @@ -1 +0,0 @@ -/usr/share/nginx/modules-available/mod-http-upstream-fair.conf \ No newline at end of file diff --git a/nginx/modules-enabled/50-mod-http-xslt-filter.conf.removed b/nginx/modules-enabled/50-mod-http-xslt-filter.conf.removed deleted file mode 120000 index 51d7ca77..00000000 --- a/nginx/modules-enabled/50-mod-http-xslt-filter.conf.removed +++ /dev/null @@ -1 +0,0 @@ -/usr/share/nginx/modules-available/mod-http-xslt-filter.conf \ No newline at end of file diff --git a/nginx/modules-enabled/50-mod-mail.conf.removed b/nginx/modules-enabled/50-mod-mail.conf.removed deleted file mode 120000 index baa6ea94..00000000 --- a/nginx/modules-enabled/50-mod-mail.conf.removed +++ /dev/null @@ -1 +0,0 @@ -/usr/share/nginx/modules-available/mod-mail.conf \ No newline at end of file diff --git a/nginx/modules-enabled/50-mod-stream.conf.removed b/nginx/modules-enabled/50-mod-stream.conf.removed deleted file mode 120000 index 7f65cc5f..00000000 --- a/nginx/modules-enabled/50-mod-stream.conf.removed +++ /dev/null @@ -1 +0,0 @@ -/usr/share/nginx/modules-available/mod-stream.conf \ No newline at end of file diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 4dda8922..1cc6f676 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -16,7 +16,7 @@ http { sendfile on; tcp_nopush on; tcp_nodelay on; - keepalive_timeout 0; + keepalive_timeout 65; types_hash_max_size 2048; server_tokens off; client_max_body_size 32M; diff --git a/php/7.4/fpm/php.ini b/php/7.4/fpm/php.ini index 02d0820f..b4eddd71 100644 --- a/php/7.4/fpm/php.ini +++ b/php/7.4/fpm/php.ini @@ -691,7 +691,7 @@ auto_globals_jit = On ; Its value may be 0 to disable the limit. It is ignored if POST data reading ; is disabled through enable_post_data_reading. ; http://php.net/post-max-size -post_max_size = 64M +post_max_size = 4096M ; Automatically add files before PHP document. ; http://php.net/auto-prepend-file @@ -843,7 +843,7 @@ file_uploads = On ; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize -upload_max_filesize = 64M +upload_max_filesize = 4096M ; Maximum number of files that can be uploaded via a single request max_file_uploads = 20 @@ -959,7 +959,7 @@ cli_server.color = On [Date] ; Defines the default timezone used by the date functions ; http://php.net/date.timezone -;date.timezone = +date.timezone = Europe/Berlin ; http://php.net/date.default-latitude ;date.default_latitude = 31.7667 diff --git a/php/8.0/fpm/php-fpm.conf b/php/8.0/fpm/php-fpm.conf index c9ea4615..69f7923a 100644 --- a/php/8.0/fpm/php-fpm.conf +++ b/php/8.0/fpm/php-fpm.conf @@ -65,7 +65,7 @@ error_log = /var/log/php8.0-fpm.log ; interval set by emergency_restart_interval then FPM will restart. A value ; of '0' means 'Off'. ; Default Value: 0 -;emergency_restart_threshold = 0 +emergency_restart_threshold = 10 ; Interval of time used by emergency_restart_interval to determine when ; a graceful restart will be initiated. This can be useful to work around @@ -73,13 +73,13 @@ error_log = /var/log/php8.0-fpm.log ; Available Units: s(econds), m(inutes), h(ours), or d(ays) ; Default Unit: seconds ; Default Value: 0 -;emergency_restart_interval = 0 +emergency_restart_interval = 1m ; Time limit for child processes to wait for a reaction on signals from master. ; Available units: s(econds), m(inutes), h(ours), or d(ays) ; Default Unit: seconds ; Default Value: 0 -;process_control_timeout = 0 +process_control_timeout = 10 ; The maximum number of processes FPM will fork. This has been designed to control ; the global number of processes when using dynamic PM within a lot of pools. diff --git a/php/8.0/fpm/php.ini b/php/8.0/fpm/php.ini index 32e0bbcd..47b65177 100644 --- a/php/8.0/fpm/php.ini +++ b/php/8.0/fpm/php.ini @@ -223,7 +223,7 @@ precision = 14 ; Development Value: 4096 ; Production Value: 4096 ; http://php.net/output-buffering -output_buffering = 4096 +output_buffering = Off ; You can redirect all of the output of your scripts to a function. For ; example, if you set output_handler to "mb_output_handler", character @@ -406,7 +406,7 @@ expose_php = Off ; Maximum execution time of each script, in seconds ; http://php.net/max-execution-time ; Note: This directive is hardcoded to 0 for the CLI SAPI -max_execution_time = 30 +max_execution_time = 120 ; Maximum amount of time each script may spend parsing request data. It's a good ; idea to limit this time on productions servers in order to eliminate unexpectedly @@ -416,7 +416,7 @@ max_execution_time = 30 ; Development Value: 60 (60 seconds) ; Production Value: 60 (60 seconds) ; http://php.net/max-input-time -max_input_time = 60 +max_input_time = 120 ; Maximum input variable nesting level ; http://php.net/max-input-nesting-level @@ -427,7 +427,7 @@ max_input_time = 60 ; Maximum amount of memory a script may consume ; http://php.net/memory-limit -memory_limit = 128M +memory_limit = 512M ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Error handling and logging ; @@ -700,7 +700,7 @@ auto_globals_jit = On ; Its value may be 0 to disable the limit. It is ignored if POST data reading ; is disabled through enable_post_data_reading. ; http://php.net/post-max-size -post_max_size = 32M +post_max_size = 4096M ; Automatically add files before PHP document. ; http://php.net/auto-prepend-file @@ -852,7 +852,7 @@ file_uploads = On ; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize -upload_max_filesize = 24M +upload_max_filesize = 4096M ; Maximum number of files that can be uploaded via a single request max_file_uploads = 20 @@ -970,7 +970,7 @@ cli_server.color = On [Date] ; Defines the default timezone used by the date functions ; http://php.net/date.timezone -;date.timezone = +date.timezone = Europe/Berlin ; http://php.net/date.default-latitude ;date.default_latitude = 31.7667 @@ -1364,7 +1364,7 @@ session.use_strict_mode = 0 session.use_cookies = 1 ; http://php.net/session.cookie-secure -;session.cookie_secure = +session.cookie_secure = True ; This option forces PHP to fetch and use a cookie for storing and maintaining ; the session id. We encourage this operation as it's very helpful in combating @@ -1760,20 +1760,20 @@ ldap.max_links = -1 [opcache] ; Determines if Zend OPCache is enabled -;opcache.enable=1 +opcache.enable=1 ; Determines if Zend OPCache is enabled for the CLI version of PHP -;opcache.enable_cli=0 +opcache.enable_cli=1 ; The OPcache shared memory storage size. -;opcache.memory_consumption=128 +opcache.memory_consumption=128 ; The amount of memory for interned strings in Mbytes. -;opcache.interned_strings_buffer=8 +opcache.interned_strings_buffer=8 ; The maximum number of keys (scripts) in the OPcache hash table. ; Only numbers between 200 and 1000000 are allowed. -;opcache.max_accelerated_files=10000 +opcache.max_accelerated_files=10000 ; The maximum percentage of "wasted" memory until a restart is scheduled. ;opcache.max_wasted_percentage=5 @@ -1791,7 +1791,7 @@ ldap.max_links = -1 ; How often (in seconds) to check file timestamps for changes to the shared ; memory storage allocation. ("1" means validate once per second, but only ; once per request. "0" means always validate) -;opcache.revalidate_freq=2 +opcache.revalidate_freq=1 ; Enables or disables file search in include_path optimization ;opcache.revalidate_path=0 diff --git a/php/8.0/fpm/pool.d/www.conf b/php/8.0/fpm/pool.d/www.conf index e21e6158..8262754e 100644 --- a/php/8.0/fpm/pool.d/www.conf +++ b/php/8.0/fpm/pool.d/www.conf @@ -137,7 +137,7 @@ pm.max_spare_servers = 3 ; This can be useful to work around memory leaks in 3rd party libraries. For ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. ; Default Value: 0 -;pm.max_requests = 500 +pm.max_requests = 1000 ; The URI to view the FPM status page. If this value is not set, no URI will be ; recognized as a status page. It shows the following information: @@ -423,11 +423,11 @@ pm.max_spare_servers = 3 ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from ; the current environment. ; Default Value: clean env -;env[HOSTNAME] = $HOSTNAME -;env[PATH] = /usr/local/bin:/usr/bin:/bin -;env[TMP] = /tmp -;env[TMPDIR] = /tmp -;env[TEMP] = /tmp +env[HOSTNAME] = $HOSTNAME +env[PATH] = /usr/local/bin:/usr/bin:/bin +env[TMP] = /tmp +env[TMPDIR] = /tmp +env[TEMP] = /tmp ; Additional php.ini defines, specific to this pool of workers. These settings ; overwrite the values previously defined in the php.ini. The directives are the