Outsource Support Blog
Restrict FTP access by IP
You can restrict FTP access by IP through a .ftpaccess file. # # Simple .ftpaccess file to control which IPs # can access this directory structure # Allow 212.32.5.0/26 Allow 158.152.0.0/16 DenyAll # # end # If this method doesn’t work you can also use iptables. However, this is only a valid option if you …
Hello World test script
CGI-PERL Hello World #!/usr/local/bin/perl print “Content-type: text/htmlnn”; print “Hello, world from Server Sitters!n”; ASP Hello World <HTML> <HEAD> <Title>Server Sitters Hello World! ASP Example</title> </HEAD> <BODY background=”” bgColor=#ffffff> <P>From all of the Server Sitter’s Staff we would like to say,</P> <h2> <% Response.Write (“Hello World!”) %> </h2> </BODY> </HTML> PHP Hello World <HTML> <HEAD> <Title>Server …
Argument list too long
In Linux there is a maximum number of files that can be removed from a folder using: rm -rf /home/$foldername/* Instead, you can use the find command which will find each file in a specific folder and then remove it. This is extremely helpful when you have to remove thousands of files from a mail …
obfuscate PHP version
To hide your php version edit your php.ini flie: Change the following option expose_php = On to expose_php = Off or: expose_php = 1 to expose_php = 0 Then restart apache.
Get CPU speed in Linux
cat /proc/cpuinfo This will show you the number of processors/cores and the speed/memory capabilities of them.
Sending e-mail with CDO
CDONTs Microsoft has discontinued the use of CDONTs on Windows 2000, Windows XP and Windows 2003. If you have used CDONTs in your ASP applications, you should update the code and use the new CDO technology. Sending e-mail with CDO CDO (Collaboration Data Objects) is a Microsoft technology that is designed to simplify the creation …
Make a file read only
To make a file on a Linux system read only use the following: #add protection chattr +i filename This will ensure nothing can change the file unless it removes the chattr bit prior to writing to the file. If you need to update the file run: #remove protection chattr -i filename This will enable editing …
disable selinux
selinux often breaks applications or scripts and it’s necessary to disable selinux. To disable selinux: echo 0 > /selinux/enforce
sed string replacement
Here’s how you can replace a string in a file with sed: perl -pi -e ‘s/replaceme/reoplacewith/g’ filename.txt This is a VERY basic replacement without and special characters. Be VERY careful if you have special characters that you’re trying to replace. If you have characters like: / you will have to proceed them with a to …
Create a cron job
- Apache (22)
- ASP (1)
- CGI-Perl (1)
- CloudFlare (2)
- Coldfusion (2)
- Cpanel (75)
- CPVLabs (1)
- Customer Service (11)
- DNS (9)
- Domains (1)
- DSM (2)
- Email (17)
- enom (1)
- Exim (13)
- FTP (8)
- Help Desk (2)
- Hosting (60)
- HSphere (7)
- Htaccess (11)
- Joomla (1)
- Linux (88)
- Miscellaneous (14)
- Miva (1)
- MySQL (15)
- Networking (1)
- OpenVZ (1)
- Outsourced Support (58)
- PHP (10)
- Plesk (13)
- Postfix (2)
- Recent News (37)
- Security (37)
- Sendmail (6)
- Spam (5)
- Thrive (1)
- VPS (7)
- Webmail (3)
- WHMCS (1)
- Windows Servers (9)
- Wordpress (7)