Crawling and IP permissions

It is best handled with a robots.txt file, for just bots that respect the file.

To block the whole site add this to robots.txt in the root directory of your site:

User-agent: *
Disallow: /
To limit access to your site for everyone else, .htaccess is better, but you would need to define access rules, by IP address for example.

Below are the .htaccess rules to restrict everyone except your people from your company IP:

Order allow,deny
# Enter your companies IP address here
Allow from 255.1.1.1
Deny from all

Common Commands

See list of actions on server: netstat -punta |grep nginx |wc -l


How do I login as root user?

Open terminal and simply type the following command:
$ sudo bash

OR
$ sudo -s

ls, ls -1 list dir
cd, cd-, cd ~ change dir
pwd
su -i

 

xmp

You can copy the content of a folder /source to another existing folder /dest with the command

cp -a /source/. /dest/
The -a option is an improved recursive option, that preserve all file attributes, and also preserve symlinks.

The . at end of the source path is a specific cp syntax that allow to copy all files and folders, included hidden ones.

grep -Ril “text-to-find-here” /
i stands for ignore case (optional in your case).
R stands for recursive.
l stands for “show the file name, not the result itself”.
/ stands for starting at the root of your machine.

 

 

Find file anywhere in system:

find / -name my.cnf

 

See your disc sizes report:

df -h


tail -f /var/log/syslog | grep mysql

tail -f frappe.log