Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 2 down vote accepted
  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

share|improve this answer
    
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

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.