0

I am looking to install the HttpGeoipModule for NGINX but learning I have to recompile the entire thing from source in order to do so. I have a new Media Temple DV 4.0 server and that comes with nginx v 1.3.0 stock and have never had to recompile from source before and a bit nervous to make changes without being able to revert to a previous state in the event something messes up (that and the fact it is affecting a live server so no idea what downtime is).

My plan was to copy all the existing modules used (nginx -V to list them all and copy the modules already compiled). Then rebuild from source with the copied info above and including the ./configure --with-http_geoip_module reference.

Is is possible to backup the existing nginx configuration in the event something goes wrong?

peterh
  • 4,914
  • 13
  • 29
  • 44
JM4
  • 1,104
  • 3
  • 18
  • 29

2 Answers2

3
  1. Find out where all the files are kept, first.

    whereis nginx

    Example Output: nginx: /usr/sbin/nginx /etc/nginx /usr/share/nginx /usr/share/man/man1/nginx.1.gz1

  2. Copy the directories and contained files and sub-directories to a backup location.

    cp -Rp path/to/nginx path/to/backup

tacotuesday
  • 1,349
  • 1
  • 14
  • 26
  • Thanks. I am looking through recompiling from source and it seems like it is going to be tougher than I thought because *from source* will place into previously uncreated or unused directories. Thanks for help. – JM4 Aug 29 '12 at 22:43
2

Just make a copy of the existing runtime directory first (e.g. /opt/nginx).

HTTP500
  • 4,827
  • 4
  • 22
  • 31