0

What is the recommended path to compile or install nginx with fastcgi_cache on Ubuntu 12.04 LTS precise that works with up-to-date nginx-common (read >= ver 1.2.7) packages?

Or is there a method to efficiently compile nginx completely from scratch in a debian / ubuntu server that is preferred?

ylluminate
  • 1,155
  • 2
  • 17
  • 35

1 Answers1

1

I don't think there is an "official" recommended path. What i usually like to do is the following:

configure --prefix=/usr/local/nginx-1.2.7 or whatever the version number is

ln -s /usr/local/nginx-1.2.7 /usr/local/nginx To link to the currently active version

Then i always start it using the path without version /usr/local/nginx and write the init scripts accordingly. This makes updating it much easier by first installing the newer version into another path and later just changing the link:

configure --prefix=/usr/local/nginx-1.2.8

ln -fs /usr/local/nginx-1.2.8 /usr/local/nginx change the link and then restart

Furthermore it makes it easy to switch back if you discover that there is a problem with the newer version.

For temporary things like the cache, if memory allows, i create a tmpfs partition and mount it in something like /var/nginx.

replay
  • 3,240
  • 14
  • 17