Question: How can I use PHP to display the “last modified” date on my website’s main page? Answer: For any type of website that includes factual information, it is important to tell users when the information was added to the site. Information that was relevant five years ago might not …
Read More »Logging user agent data in Apache
Question: How do I tell Apache to log user agent information? Answer: Normally, Apache logs information about site visitors to /var/logs/httpd/ and uses files like access_log, error_log, etc. While it does give some information about the users, it does not include user agent information by default. User agent information looks …
Read More »How to manually install stubborn APT packages
Question: What do I do when I get the following error with apt-get: error processing /var/cache/apt/archives/packagename_0.80.1-1_all.deb : trying to overwrite ‘libsomething.1.0.so, which is also in “libotherpackage”? Answer: These types of errors can be very annoying when trying to upgrade packages on a Linux server with apt-get. Sometimes these can be …
Read More »How to delete multiple files in various directories in Linux
Question: When uploading files to my Linux server from my windows computer, I have accumulated WS_FTP.log files and thumbs.db files in multiple directories. Is there an easy way to delete all of them at once without navigating through each directory? Answer: With Linux, of course there is. You can accomplish …
Read More »PhpSecInfo: PHP security information tool
Allowing access to any type of scripting on your web server opens the door for security problems. You never know when an attacker might randomly (or purposely) select your server as a target. Any running scripts have the potential for exploitation. PHP is no exception, and taking steps to secure …
Read More »How to configure password aging in Linux
If you have ever worked for a corporation or used IT services at a university, you have undoubtedly been prompted at one time to change your password. It is annoying and seems like a waste of time, but it is important. Running a web server that gives all or some …
Read More »How to force YUM to exclude certain packages
Question: Is there a way to tell YUM to ignore certain packages when performing updates on a CentOS Linux server? Answer: There certainly is, and in some cases it can save your server from an unfortunate mishap. When running a dedicated server, particularly one with multiple websites, you run the …
Read More »Testing your mail server for an open relay
Question: How do I make sure my mail server isn’t an open relay? Answer: First we should be clear on what an open relay is. According to spamhelp.org, an open relay is: “a mail server that does not verify that it is authorised to send mail from the email address …
Read More »What is DNSBL and should I care about it?
Question: What is DNSBL and should I care about it? Answer: DNSBL stands for DNS Block List or Blacklist. Essentially, it is a published list of ipp addresses that are in some way connected to spam. Although the most common form of DNSBL is a list of actually servers and/or …
Read More »How to install Shoutcast on a Linux server
Yesterday, we learned about two radio streaming servers available for Linux: Shoutcast and Icecast. Today, you will learn how to install and setup a Shoutcast server. In this example, you will create a special user to run Shoutcast, rather than having it run as root, which is a security risk. …
Read More »