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 export 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…

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: #!/bin/bash PATH=/usr/sbin:/usr/bin:/sbin:/bin sudo service nginx stop /home/igor/letsencrypt/letsencrypt-auto renew service nginx start exit 0 2. Make it executable `chmod +x /root/certrenew.sh` 3. `sudo crontab -e` 4. Add crontab job. 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: #!/bin/bash PATH=/usr/sbin:/usr/bin:/sbin:/bin if [[ ! “$(/usr/sbin/service mysql status)” =~ “active (running)” ]] then echo $(date -u) “MySQL service on the server has been stopped. It has now been restarted.” sudo service mysql 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: #!/bin/bash PATH=/usr/sbin:/usr/bin:/sbin:/bin if [[ ! “$(/etc/init.d/nginx status)” =~ “active (running)” ]] then echo $(date -u) “NGINX server has been stopped. It has now been restarted.” service nginx start fi 2. Make it Read more…