Welcome! Log In Create A New Profile

Advanced

Re: Clean-URL rewrite rule with nested "location" and alias directive

Ben Johnson
November 26, 2013 11:39AM
On 11/23/2013 12:36 PM, Ben Johnson wrote:
> location ^~ /stage/ {
>> root /var/www/example.com/private/stage/web/;
>> # The files are read from /var/www/example.com/private/stage/web/stage/
>> index index.php index.html index.htm;
>> try_files $uri $uri/ /stage/index.php?q=$uri;
>>
>> location ~ \.php$ {
>> # use a different "root" here if you want; but make sure the php
>> # files can be read from within "stage/" below that root.
>> try_files $uri /stage/index.php?q=$uri;
>> fastcgi_pass unix:/var/run/php5-fpm.sock;
>> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
>> include /etc/nginx/fastcgi_params;
>> }
>> }

Francis,

Yes! After making the changes you recommended on the filesystem
(enabling me to ditch "alias"), the staging site is now working
perfectly with a slight variation of the above configuration.

For the sake of academic curiosity, I would like to try some of the
alternate configurations that you cooked-up, but I'll save that for
later. For now, I'm just thrilled to have this working!

Again, I can't thank you enough for your patience, thoroughness, and
generosity with your time.

Best regards, and cheers to a working configuration!

-Ben

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

Re: Clean-URL rewrite rule with nested "location" and alias directive

Ben Johnson November 26, 2013 11:38AM

Re: Clean-URL rewrite rule with nested "location" and alias directive

Francis Daly November 26, 2013 11:38AM

Re: Clean-URL rewrite rule with nested "location" and alias directive

Ben Johnson November 26, 2013 11:38AM

Re: Clean-URL rewrite rule with nested "location" and alias directive

Ben Johnson November 26, 2013 11:39AM

Re: Clean-URL rewrite rule with nested "location" and alias directive

Francis Daly November 26, 2013 11:39AM

Re: Clean-URL rewrite rule with nested "location" and alias directive

Ben Johnson November 26, 2013 11:39AM

Re: Clean-URL rewrite rule with nested "location" and alias directive

Ben Johnson November 26, 2013 11:39AM

Re: Clean-URL rewrite rule with nested "location" and alias directive

Francis Daly November 26, 2013 11:39AM

Re: Clean-URL rewrite rule with nested "location" and alias directive

Francis Daly November 26, 2013 11:38AM

Re: Clean-URL rewrite rule with nested "location" and alias directive

Ben Johnson November 26, 2013 11:39AM

Re: Clean-URL rewrite rule with nested "location" and alias directive

Ben Johnson November 26, 2013 11:38AM

Re: Clean-URL rewrite rule with nested "location" and alias directive

Francis Daly November 26, 2013 11:39AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 136
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