Not able to upgrade Ubuntu release

With the release of Ubuntu 20.02 LTS (Focal Fossa) my current Ubuntu server running 19.04 Disco Dingo did not receive updates anymore – Time to upgrade.So I connected to my server using SSH and entered the command which failed with the error: Failed to connect to https://changelogs.ubuntu.com/meta-release. Check your Internet connection Weiterlesen…

PHP 7.2 (APCU)

https://janw.me/2017/installing-php7-2-rapsberry-pi/ https://stackoverflow.com/questions/47800957/apcu-is-not-enabled-when-installed-with-apt-get-on-php7-2-apache-stretch-image https://serverpilot.io/docs/how-to-install-the-php-apcu-extension add extension=apcu.so to /etc/php/7.2/mods-available/apcu.ini Extensions are loaded when the appropriate symlink is placed in /etc/php/7.2/fpm/conf.d/ with eg. ln -s /etc/php/7.2/mods-available/apcu.ini /etc/php/7.2/fpm/conf.d/20-apcu.ini So it is not necessary to add the line extension=apcu.so to any php.ini file. Tune PHP FPM: https://www.if-not-true-then-false.com/2011/nginx-and-php-fpm-configuration-and-optimizing-tips-and-tricks/

MySQL/MariaDB tuning

Connect to UNIX socket in PHP: When the host name is set to „localhost“, then the connection to the server is made thru a domain socket by default. Check following parameters in /etc/mysql/my.cnf: max_connections table_open_cache thread_stack read_buffer_size join_buffer_size sort_buffer_size key_buffer_size Table size max_heap_table_size tmp_table_size Query cache query_cache_limit query_cache_min_res_unit query_cache query_cache_size Weiterlesen…

Create and automatically renew Letsencrypt certificate

Originally found here https://decatec.de/home-server/owncloud-9-auf-ubuntu-server-16-04-lts-mit-nginx-mariadb-php-7-und-lets-encrypt/. Thanks for the great setup guide! But due to a problem with my nginx setup I have to update my nginx config every time I want to renew the certificate. On SurServ sudo su cd /etc/nginx/conf.d nano surrouter.asuscomm.com comment out: return 301 https://$server_addr$request_uri; CTRL+O and CTRL+X service nginx Weiterlesen…

Nginx Server tuning

test page: https://gtmetrix.com/ CACHE!!! https://www.digitalocean.com/community/tutorials/how-to-implement-browser-caching-with-nginx-s-header-module-on-ubuntu-16-04 https://codex.wordpress.org/Nginx let google host jquery https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/ https://docs.nextcloud.com/server/12/admin_manual/configuration_server/server_tuning.html#enable-php-opcache Add those options somewhere in /etc/php/7.0/cli/php.ini and /etc/php/7.0/fpm/php.ini   Nginx and PHP-FPM Configuration and Optimizing Tips and Tricks http2 server push: https://www.nginx.com/blog/nginx-1-13-9-http2-server-push/ use unix sockets where possible: http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass unix inter-process communication benchmark: http://www.cl.cam.ac.uk/research/srg/netos/projects/ipc-bench/ reuseports: https://www.nginx.com/blog/socket-sharding-nginx-release-1-9-1/ –> does not seem to work Weiterlesen…

Build latest version of OpenSSL and Nginx from source

OpenSSL Download latest source: wget https://www.openssl.org/source/ Untar file: tar xvf cd into directory ./config (no sudo) make (no sudo) make test (no sudo) sudo make install reboot check new version with „openssl version“   If „openssl version“ gives an error after reboot: https://serverfault.com/questions/818445/error-while-loading-shared-libraries-libcrypto-so-1-1   Raspberry PI Nginx: https://github.com/MatthewVance/nginx-build Ubuntu: https://www.nginx.com/resources/admin-guide/installing-nginx-open-source/ and: https://www.vultr.com/docs/how-to-compile-nginx-from-source-on-ubuntu-16-04

MySQL inserts wrong datetime in table

set „default-time-zone               = ‚+02:00‘ “ in /etc/mysql/my.cnf and find used php ini file: php –ini and set „date.timezone = „Europe/Vienna“ “ in /etc/php/7.0/fpm/php.ini „date.timezone = „Europe/Vienna“ “ in /etc/php/7.0/cli/php.ini Maybe above isn’t necessary, just be aware of the export-settings in phpmyadmin. Under the point Data Creation Options there Weiterlesen…

Fix WordPress nginx infinite redirect

I’ve tried to access my newly setup WordPress-page through Chrome, Safari and Firefox and yll gave me the same endless redirect error. Finally after long search on Google and trial and error I found the solution https://stackoverflow.com/questions/19979843/wordpress-nginx-redirect-loop. Go to: /var/www/wordpress/wp-content/themes/THEMENAME/functions.php and add remove_filter(‚template_redirect‘, ‚redirect_canonical‘); right after the php opening tag (<?php). Weiterlesen…