How to install PhpMyAdmin + Nginx in Mac OS X

In previous post I’ve talked about installing MySQL in Mac OS X. Today I want to talk about PhpMyAdmin. Tool which help work with MySQL databases. Here steps how to install it and configure under Nginx webserver. 1. Create virtualhost for PhpMyAdmin. Create /usr/local/etc/nginx/sites-available/phpmyadmin file with next content

Edit hosts Read more…

Nginx + MySQL configurations

Here is instructions how to install MySQL and PhpMyAdmin on Mac OS X 1. Download and install DMG file. Link for downloading : https://dev.mysql.com/downloads/mysql/ 2. Installer will generate temporary root password. Save it in text file for next steps. 3. Add /usr/local/mysql/bin to PATH If you use ZSH open ~/.zshrc file and add

Read more…

How to add Public Key Authentication for Ubuntu 16.04 server

For better security we should use public key authentication on the server. Here is steps how to do it. 1. Generate SSH key pair on your local computer. Skip if you already have ssh key pair in your local computer

Output:

Hit ENTER and enter passphrase for your Read more…

How to configure PHP with Nginx webserver on Mac OS X

Before starting installation PHP-FPM and configurations you should have Nginx installed and configured. If you don’t have it ready please follow my previous post about installing and configuring Nginx on Mac OS X. Here is the link https://www.hrupin.com/2017/11/how-to-install-nginx-webserver-on-mac-os-x So, here we have installed and configured NGinx. Let’s install and configure PHP-FPM. Read more…

How to install Nginx webserver on Mac OS X

Before start you should ensure that you have Command Line Tools installed in your mac. It is part of XCode. You should have it installed and updated. Install Command Line Tools if not exist

Install Nginx using Homebrew

Test Installation

Output should look like this

Also you Read more…

Letsencrypt automatic certificate renew

To make automatic renew you Letsencrypt certificates you need create crontab job. Here is simple instructions 1. Create /root/certrenew.sh file with content:

2. Make it executable chmod +x /root/certrenew.sh 3. sudo crontab -e 4. Add crontab job. Job for running every day at 3:15AM will be next:

/var/log/le-renew.log Read more…

How to automatically restart MySQL service

Here is instruction how to launch MySQL server after close unexpectedly. 1. Create /root/mysqlfix.sh file with next content:

2. Make it executable chmod +x /root/mysqlfix.sh 3. sudo crontab -e 4. Add crontab job. For 3 min period job will be next:

/var/log/mysqlfix.log – log file Let me know Read more…

How to automatically restart Nginx

Here is instruction how to launch Nginx server after close unexpectedly. 1. Create /root/nginxfix.sh file with next content:

2. Make it executable chmod +x /root/nginxfix.sh 3. sudo crontab -e 4. Add crontab job. For 3 min period job will be next:

/var/log/nginxfix.log – log file Let me know Read more…

How to fix Attempting to renew cert from /etc/letsencrypt/renewal/example.com.conf produced an unexpected error: Problem binding to port 443: Could not bind to IPv4 or IPv6.. Skipping.

Issue: Attempting to renew cert from /etc/letsencrypt/renewal/example.com.conf produced an unexpected error: Problem binding to port 443: Could not bind to IPv4 or IPv6.. Skipping. How to fix: Just stop webserver before renew letsencrypt.