From 6507b91829b41ab24e8a39380ec3ec93d1895910 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Fri, 7 Dec 2018 06:43:38 +0100 Subject: [PATCH] daily autocommit --- logrotate.d/php7.0-fpm | 3 ++- nginx/nginx.conf | 4 +++- nginx/sites-available/default | 22 +++++++++++----------- nginx/templates/phpmyadmin.tmpl | 2 +- nginx/templates/redirect_to_https.tmpl | 4 ++++ php/7.0/fpm/php-fpm.conf | 2 ++ php/7.0/fpm/php.ini | 6 ++++-- 7 files changed, 27 insertions(+), 16 deletions(-) diff --git a/logrotate.d/php7.0-fpm b/logrotate.d/php7.0-fpm index cbc1e69..dcf5a6e 100644 --- a/logrotate.d/php7.0-fpm +++ b/logrotate.d/php7.0-fpm @@ -1,6 +1,7 @@ -/var/log/php7.0-fpm.log { +/var/log/php7.0-fpm.log /var/log/php7.0-fpm/*.log { rotate 12 weekly + minsize 1M missingok notifempty compress diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 6d55eb2..901e156 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -17,7 +17,8 @@ http { server_tokens off; gzip on; - keepalive_timeout 600; + # keepalive_timeout 600; + keepalive_timeout 10; sendfile on; client_max_body_size 12m; @@ -31,4 +32,5 @@ http { } include /etc/nginx/conf.d/*.conf; + include /etc/nginx/sites-enabled/*; } diff --git a/nginx/sites-available/default b/nginx/sites-available/default index c841ceb..10cff2e 100644 --- a/nginx/sites-available/default +++ b/nginx/sites-available/default @@ -52,22 +52,22 @@ server { } # pass PHP scripts to FastCGI server - # - #location ~ \.php$ { - # include snippets/fastcgi-php.conf; - # - # # With php-fpm (or other unix sockets): - # fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + + location ~ \.php$ { + include snippets/fastcgi-php.conf; + + # With php-fpm (or other unix sockets): + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; # # With php-cgi (or other tcp sockets): # fastcgi_pass 127.0.0.1:9000; - #} + } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} + + location ~ /\.ht { + deny all; + } } diff --git a/nginx/templates/phpmyadmin.tmpl b/nginx/templates/phpmyadmin.tmpl index 228199b..e123f04 100644 --- a/nginx/templates/phpmyadmin.tmpl +++ b/nginx/templates/phpmyadmin.tmpl @@ -1,5 +1,5 @@ # phpmyadmin -location /phpmyadmin { +location ~ ^/phpmyadmin { alias /usr/share/phpmyadmin; index index.php; } diff --git a/nginx/templates/redirect_to_https.tmpl b/nginx/templates/redirect_to_https.tmpl index be3d9b4..487df53 100644 --- a/nginx/templates/redirect_to_https.tmpl +++ b/nginx/templates/redirect_to_https.tmpl @@ -2,3 +2,7 @@ location ~ ^/mail { rewrite ^ https://$host$request_uri?; } location ~* ^/sogo { rewrite ^ https://$host/SOGo; } location ~ ^/iredadmin { rewrite ^ https://$host$request_uri?; } + +location ~ ^/phpmyadmin { + rewrite ^ https://$host$request_uri?; +} diff --git a/php/7.0/fpm/php-fpm.conf b/php/7.0/fpm/php-fpm.conf index afce1d2..226e2a8 100644 --- a/php/7.0/fpm/php-fpm.conf +++ b/php/7.0/fpm/php-fpm.conf @@ -123,3 +123,5 @@ error_log = /var/log/php7.0-fpm.log ; - the global prefix if it's been set (-p argument) ; - /usr otherwise include=/etc/php/7.0/fpm/pool.d/*.conf + +; vim: filetype=dosini diff --git a/php/7.0/fpm/php.ini b/php/7.0/fpm/php.ini index fb7cde3..811a94b 100644 --- a/php/7.0/fpm/php.ini +++ b/php/7.0/fpm/php.ini @@ -653,7 +653,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 = 8M +post_max_size = 25M ; Automatically add files before PHP document. ; http://php.net/auto-prepend-file @@ -758,6 +758,7 @@ enable_dl = Off ; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. ; http://php.net/cgi.fix-pathinfo ;cgi.fix_pathinfo=1 +cgi.fix_pathinfo=0 ; if cgi.discard_path is enabled, the PHP CGI binary can safely be placed outside ; of the web tree and people will not be able to circumvent .htaccess security. @@ -806,7 +807,7 @@ file_uploads = On ; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize -upload_max_filesize = 2M +upload_max_filesize = 25M ; Maximum number of files that can be uploaded via a single request max_file_uploads = 20 @@ -922,6 +923,7 @@ cli_server.color = On ; 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 -- 2.39.5