If you’re troubleshooting an htaccess file and aren’t seeing any changes, no matter what you put in the file, make sure that you have permissions to execute the directives you’re using. Check Apache’s conf file to see if AllowOverride None is set for your site or directory. If it is, add the directives that you […]
Making Coding Mistakes Obvious
Joel Spolsky wrote an interesting article on ways to make coding mistakes obvious, like using semantic prefixes on variable names. If you have unfiltered data from the user, you can make the variable something like $usFoo so that you always remember that the data is unsafe, and won’t output it unfiltered (therefore preventing malicious code injection).
Firewalling an OpenVZ node and containers
The OpenVZ wiki has a nice script for firewalling an OpenVZ node and it’s containers. It creates a service and configures iptables to block all traffic to the node (except the ports you specify), but allow all traffic through to the containers, so that they can manage their own firewall. It also allows the container’s […]
Content Above Anchors Disappear
It turns out there’s a serous problem with the One True Layout method of creating equal height columns. All of the content above an anchor will be shifted up, making it seem like it disappeared. There aren’t any universal or reliable fixes for this, so the Faux Columns method is probably the best choice if […]
Working with Qmail’s Queue
Relaying Qmail Through a Spam Filter
If you’re running a mail service on a web server so it can send out e-mail from contact forms, etc then you’ll want to make sure it’s relaying outbound mail through a spam filter, or it could be used to send spam if the forms get hijacked. For qmail, you just need to create /var/qmail/control/smtproutes […]
Memorable IP Address
If you’re troubleshooting a network’s uplink to the Internet and want a memorable external IP address to ping, then you can use 4.2.2.2, which is one of Verizon’s DNS servers.