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…

Run launchd script at login (macOS)

First of all create your bash script and place it somewhere. Next think of a name in the following reverse domain notation com.mycompanyname.mydepartment.mytaskname.plist and create the property list file (.plist) with the following content: Now place com.mycompanyname.mydepartment.mytaskname.plist in ~/Library/LaunchAgents and run in terminal: launchctl load ~/Library/LaunchAgents/com.mycompanyname.mydepartment.mytaskname.plist This tells launchd to 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…

BMW E39

[latexpage] Daten zum Auto: BMW E39 BJ 10/2002 310000km M57D30 2926$cm^3$ 410Nm, 142kW (190PS) LCM 3 verbaut Allgemein findet man in allen Foren im Internet recht viel Information, man muss nur immer die relevanten und richtigen herauspicken. Die ganzen Abkürzungen die benutzt werden, ohne zu erwähnen was er/sie/es ist, macht 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…