Hello,
Is it possible to compile nginx such that installations can be moved?
For instance, say we install nginx to /tmp/original/nginx:
./configure --prefix=/tmp/original/nginx
make
make install
And we then move the installation directory to /tmp/relocated/nginx:
mv /tmp/original/nginx /tmp/relocated/nginx
Is there a way to run nginx in its new directory as though it had been
installed there directly, using either compile- or run-time options?
Thanks
Mike
on 2012-11-05 22:24
on 2012-11-05 22:43
> Is there a way to run nginx in its new directory as though it had been > installed there directly, using either compile- or run-time options? You can use the -p switch after 'nginx' binary to change the default install time prefix (and/or -c for different path for config file). ./nginx -p /tmp/relocated/nginx http://wiki.nginx.org/CommandLine rr
on 2012-11-05 22:52
> > Is there a way to run nginx in its new directory as though it had been > > installed there directly, using either compile- or run-time options? > > You can use the -p switch after 'nginx' binary to change the default > install time prefix (and/or -c for different path for config file). Aha! That seems to be what I'm looking for. Not sure how I missed that -- I think I must have been expecting it to be a compile-time option rather than a run-time option. Thanks for pointing it out. Mike
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.