Category: CentOS
Protect .htaccess file
When avisitor tries to obtain access to .htaccess file, server automatically generates a 403 forbidden error. However, we can apply an extra layer of security to .htaccess Add the following Note: htaccess file permissions is 644 (chmod)
How to find CentOS or RedHat version?
Most Red Hat-based distributions, like CentOS, should have a file called redhat-release which will contain the CentOS version Run the following to see what version running on your system or or or Using your redhat-release file, you can find your distribution, version and update number. This information is very helpful for technical support staff as…
How to find Apache Version on Linux?
Run the following to see Apache version running on your Linux system or
How to disable phpinfo
The phpinfo() function is a very powerful one, you can learn quite a lot about your PHP installation. Some server administrators may choose to disable the PHP function phpinfo() for security reasons, because it displays information which can be used to compromise the server that your site is running on. You can completely disable phpinfo(). First…
How to check what PHP version running on Linux?
It’s very simple to check PHP version 1. PHP Info You can use the following to yield PHP version number via Command Line or You can create a php file contain the following, upload it to your website Note: if your sys admin disabled phpinfo, you cannot check what PHP version with phpinfo() 2. Short…
Compress files with Gzip and Zip in CentOS
Gzip Type the following command to compress a file at a shell prompt -> The file will be compressed and saved as filename.ext.gz Type the following command to expand a compressed file -> The filename.ext.gz is deleted and replaced with filename.ext Type the following command to compress multiple files at a shell prompt -> this…