Welcome! Log In Create A New Profile

Advanced

Re: How to change the root for testing

July 30, 2012 11:19AM
Do you mean that requesting /testing/something.php tries to use /home/ian/websites/coachmaster/htsecure/something.php instead of /home/ian/websites/coachmaster/testing/something.php?

In the regexp location the document_root is inherited from the server context.

I think this would help you:

map $reseller $reseller_path {
default /home/ian/websites/coachmaster/htsecure;
testing /home/ian/websites/coachmaster/testing;
}

server {
index index.php index.html index.htm;
root /home/ian/websites/coachmaster/htsecure;

rewrite ^/(?<reseller>kaleidoscope|chat|Spanish|3MCoach|testing)(.*)$ $2?rs=$reseller last;

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $reseller_path$fastcgi_script_name;
fastcgi_param HTTPS ON;
include /etc/nginx/fastcgi_params;
}
}

Regards,
Gabor Lekeny
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: 236
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready