proxy_set_header Accept-Encoding "";
you Missed an important step to modify file /etc/php/7.0/fpm/pool.d/www.conf
delete: listen 127.0.0.1:9000 and add listen = '/run/php/php7.0-fpm.sock'
No ifo php in root
********SSL cerbot********* https://certbot.eff.org/#ubuntuxenial-nginx
block access to http://$serverIP/***ONLY
proxy_pass http://111.111.111.111:8080$request_uri;
********initial server setup***********
https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04
https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands
https://www.digitalocean.com/community/questions/ubuntu-16-04-creating-new-user-and-adding-ssh-keys
https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-putty-on-digitalocean-droplets-windows-users
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04
cloudflare ip 103.53.43.36
adduser krish
ssh krish@139.59.45.80
159.89.174.101
for removing host cache: ssh-keygen -R 139.59.45.80
rmdir /home/krish/.ssh
rm -r /home/krish/.ssh
nano /home/krish/.ssh/authorized_keys
rmdir /home/krish/.ssh/authorized_keys
*******Disable UFW*********
sudo ufw status
To disable UFW you can type the following:
sudo ufw disable
To remove it you can type the following:
sudo apt-get remove ufw
To purge it (In those cases where you really hate ufw or wasting space) you can type the following:
sudo apt-get purge ufw
sudo ufw deny 22
sudo ufw delete deny 22
********Nginx as a Web Server and Reverse Proxy***********
https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-as-a-web-server-and-reverse-proxy-for-apache-on-one-ubuntu-16-04-server
sudo apt-get update
sudo apt-get install apache2 libapache2-mod-fastcgi php-fpm
To list apache loaded modules use:****
apachectl -M
apachectl -t -D DUMP_MODULES
sudo apt-get install php
This command will install PHP 7.0, as well as some other dependencies:
php-common
php7.0
php7.0-cli
php7.0-common
php7.0-fpm
php7.0-json
php7.0-opcache
php7.0-readline
php -i | grep 'FPM/FastCGI'
/etc/php/7.0/fpm/pool.d/*.conf
sudo ps aux | grep php-fpm
/usr/share/apache2/default-site/index.php
sudo nano var/log/php7.0-fpm.log
/etc/php/7.0/fpm/pool.d
echo $_SERVER['SERVER_SOFTWARE'];
sudo apt-get install php7.0-curl php7.0-gd php7.0-mbstring php7.0-mcrypt php7.0-xml php7.0-zip
libssh2-php
sudo service apache2 status
sudo systemctl restart apache2
sudo service apache2 restart
sudo service php7.0-fpm restart
sudo a2enmod rewrite
**** check if phfpmp7 running systemctl status php7.0-fpm
**** sudo systemctl status apache2.service
php.ini path /etc/php/7.0/fpm
https://docs.presscustomizr.com/article/171-fixing-maximum-upload-and-php-memory-limit-issues
sudo krish /var/log/apache2/error.log
sudo locate access.log
sudo nano /var/log/apache2/access.log
sudo nano /var/log/apache2/other_vhosts_access.log
sudo apt-get install apache2 php7.0 libapache2-mod-php7.0
sudo apt-get install libapache2-mod-php7.0
sudo apt-get install php-pear
DirectoryIndex info.php index.html
sudo apt-get install php7.0-mysql mysql-server mysql-client
*** MySQL 5.6 is compatible with MariaDB 10.0
5.7 with 10.2
sudo mysql_secure_installation
systemctl status mysql.service
sudo apt-get install libssh2-php
sudo systemctl restart apache2
sudo apt-get install phpmyadmin php-gettext
password for krish, mysql database and phpmyadmin 0gravity@H13062408
sudo phpenmod mcrypt
sudo phpenmod mbstring
https://askubuntu.com/questions/89393/how-to-search-entire-hard-drive-for-a-file
https://stackoverflow.com/questions/5776148/how-to-find-a-file-in-ubuntu
sudo find / -type f -name "permissions_backup.txt"
to list only 1 level after getting into the directory.
tree -L 1
Snapshots**********
https://www.digitalocean.com/community/tutorials/an-introduction-to-digitalocean-snapshots
https://www.digitalocean.com/community/tutorials/digitalocean-backups-and-snapshots-explained
https://www.digitalocean.com/community/tutorials/how-to-migrate-digitalocean-droplets-using-snapshots
*****Droplet after shutdown******
cat /dev/null > /root/.ssh/authorized_keys
cat /dev/null > /home/ani/.ssh/authorized_keys
sudo apt-get purge openssh-server
/etc/ssh/sshd_config
sudo systemctl reload sshd
/etc/init.d/ssh restart
sudo service sshd restart
https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-putty-on-digitalocean-droplets-windows-users
https://www.digitalocean.com/community/tutorials/how-to-create-ssh-keys-with-putty-to-connect-to-a-vps
Host *
ServerAliveInterval 30
ServerAliveCountMax 5
sudo passwd root
Digital ocean tutorial https://www.youtube.com/user/TJsWebDev
https://www.youtube.com/watch?v=n9CpF3_T_Uc DigitalOcean com: How to set up Apache, PHP5, MySQL server & PHPMyAdmin 4 min (Ubuntu 14.04)
https://www.youtube.com/watch?v=z81wofymGRc
https://www.youtube.com/watch?v=95-QZ5DSptw
https://www.youtube.com/watch?v=p4QtKXG8tKQ
https://www.youtube.com/watch?v=mn8ZXVJJr-s
https://www.youtube.com/watch?v=UrY1P041uUU transfering shared host to digitalocean
https://www.youtube.com/watch?v=h3bmXFASvuE https://www.youtube.com/watch?v=C-2KTS5xyAY phpmyadmin and unbuntu 16.04
https://www.youtube.com/watch?v=pOuo8w5sS5k ssl
https://www.youtube.com/watch?v=XhgUClE5uC0 nginx fundamental
https://www.youtube.com/watch?v=ctaECbB4030 nginx clean url
https://www.youtube.com/watch?v=6QYJUvrb7m8 https://www.youtube.com/watch?v=0yKLjVdgX9A Nginx Tutorials #5 - Redirect Url (Index, Error_page, Return, Rewrite and Try_files)
https://www.youtube.com/watch?v=AXZDWgdY2oo wordpress speed optimization vps
phpMyAdmin
Version information: 4.6.6
https://www.youtube.com/watch?v=kPLljltcO1E upgrading droplet
https://www.youtube.com/watch?v=eoj0LU7814M static file plus nginx expirebycaching
https://www.youtube.com/watch?v=qPiQXG4JrHc apache and nginx togeter Configuring Nginx as a reverse proxy for Apache
https://www.youtube.com/watch?v=V7oMJ-pfLH0 nginx apache reverse proxy ubuntu with FastCgi PHP7-fmp on Ubuntu 16.04 Server
https://www.youtube.com/watch?v=311DvLh8ems Configuring nginx as a reverse proxy for web application
https://www.youtube.com/watch?v=DEJ_gC40AAA Utilizing DigitalOcean's Floating IP Addresses
******Varnish nginx w3totalcahe*******
https://code.tutsplus.com/tutorials/optimizing-wordpress-with-varnish-and-w3-total-cache--cms-21136