Apache

Link: Nginx Hacking Tips

This is a good overview of common configurations comparing nginx's syntax to apache's.  Once you get used to it, I think nginx syntax is easier to understand, and it reads more like an actual script or program.  I've been using nginx to host SoccerBlogs.net for 3 months now and its been very solid.  In fact, …

Link: Nginx Hacking Tips Read More »

Thinking of switch to PHP w/Fast CGI?

If you’re contemplating switching to running PHP5 under FastCGI, to take advantage of apache’s threaded worker model and improve your server’s performance, think again.  If you’re used to setting and overriding php values via .htaccess files or using php_value/php_flag in your virtual host directory, this is not supported with FastCGI.  You’ll have to figure out …

Thinking of switch to PHP w/Fast CGI? Read More »

Don’t abuse PHP’s header function for redirects

PHP’s Header function can come in quite handy when you’re building your next greate web application.  Its powerful, but as a result, its tempting to misuse it to do even the simplest things, like permanent redirects.  Usually, its done like this: // redirect /publications (this page) to real page (/documents)Header("Location: /documents/"); One line of code, …

Don’t abuse PHP’s header function for redirects Read More »

Fail2Ban + Mod_Security = Spammer Bouncer

Under debian, fail2ban’s configuration is in /etc/fail2ban/.  In the filter.d directory add the following file and name it apache-modsec.conf. [Definition]# Option:  failregex# Notes.:  regex to match the password failure messages in the logfile. The#          host must be matched by a group named “host”. The tag “<HOST>” can#          be used for standard IP/hostname matching.# Values:  TEX#failregex …

Fail2Ban + Mod_Security = Spammer Bouncer Read More »

PHP File Uploads

Yesterday at work I spent the better part of the afternoon trying to figure out why a form couldn’t handle multiple file uploads. These uploads where failry big – quicktime and wmv files – so I thought the culprit was the large file size. But the script was not returning any error warnings or notices …

PHP File Uploads Read More »