How To Set Up a Firewall Using Firewalld on CentOS 7

Turning on the Firewall # sudo systemctl start firewalld.service We can verify that the service is running and reachable by typing: # firewall-cmd –state output running We can see which zone is currently selected as the default by typing: # firewall-cmd –get-default-zone output public firewall-cmd –get-active-zones output public interfaces: eth0 eth1 We can print out Read more about How To Set Up a Firewall Using Firewalld on CentOS 7[…]

Php 4 on cpanel

Here are a few articles that mention it: https://documentation.cpanel.net/display/EA/Custom+Modules https://forums.cpanel.net/threads/how-to-easy-php4-php5-side-by-side-after-removal-of-php4-from-easyapache.304942/ The End of PHP 4 https://www.siteground.com/kb/how_to_have_different_php__mysql_versions/ You can set the handler for the site using a .htaccess file in the domains webroot with the following contents: Code: AddHandler application/x-httpd-php4 .php .php4 .php3

SCP Examples

How to secure copy a file from remote server to to local directory: /home/user/file.txt = remote file /home/user/Desktop/ = path to copy to local system # scp -r user@remote.server.com:/home/user/file.txt /home/user/Desktop/ -r Recursively copy entire directories What if the port is on 2243? Use: # scp -P2243 -r user@remote.server.com:/home/user/file.txt /home/user/Desktop/ # scp -P -r user@remote.server.com:/home/user/file.txt /home/user/Desktop/ Read more about SCP Examples[…]

Find Mysql Connection script

Recently, I had to find a connection script for mysql as the clients programmer had gone away. I knew the database username and here is the grep command that found it. # cd /var/www/vhosts/domain.com/httpdocs # grep -r ‘database username’ * * Where database username is the actulay database username in the plesk database