Welcome! Log In Create A New Profile

Advanced

How to change the root for testing

July 29, 2012 04:16AM
Hi all,

I want to change the root for location /testing.
How can I do this?

This is what I have in the middle of this server stanza, yet the testing
reseller is served from the live root. :(

index index.php index.html index.htm;
root /home/ian/websites/coachmaster/htsecure;
# move root for testing reseller
location /testing {
root /home/ian/websites/coachmaster/testing;
}
# take resellers off the front of path to rs=reseller param
rewrite ^/(kaleidoscope|chat|Spanish|3MCoach|testing)(.*)$ $2?rs=$1
last;
# php to fastcgi
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS ON;
include /etc/nginx/fastcgi_params;
}

I was actually hoping to switch the root on a per-reseller basis,
perhaps by testing for a file I can "touch" or delete to switch to the
new configuration, but I can't think how to do that.

Thanks
Ian

(Sorry if this is a duplicate - the first did not appear).

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to change the root for testing

hobson42 July 29, 2012 04:16AM

Re: How to change the root for testing

leki75 July 30, 2012 11:19AM

Re: How to change the root for testing

hobson42 August 01, 2012 06:32AM

Re: How to change the root for testing

Francis Daly August 01, 2012 02:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 75
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready