stevecrozz' custom nginx binary for ubuntu 0.7.59
The nginx build in the official
ubuntu package repository is somewhat out-of-date, so I built my own
package from source using
0.7.59. I’m
going to provide it here in case anyone else would like it. One of the
new features I like is the
try_files
directive. Here’s an example of what I’m doing using 0.6.35, the full
post is here
http://lithostech.com/lighten-apaches-load-nginx:
location / {
root /var/www/fresnobeehive.com;
proxy_set_header X-Forwarded-For $remote_addr;
if (-f $document_root/beehive$uri) {
rewrite (.*) /beehive$1 break;
}
if (-f $request_filename) {
break;
}
if (-f $request_filename/index.html) {
rewrite (.*) $1/index.html break;
}
if (-f $document_root/beehive$uri/index.html) {
rewrite (.*) /beehive$1/index.html break;
}
if (!-f $request_filename) {
proxy_pass http://fresnobeehive.com:8080;
break;
}
}