Welcome! Log In Create A New Profile

Advanced

Re: nested location, proxy, alias and multiple "/" locations

Francis Daly
January 18, 2014 08:32PM
On Sat, Jan 18, 2014 at 03:58:22PM -0500, sergiks wrote:

Hi there,

> Web root folder
> of Laravel is called "public", and I want to access such installation by URI
> "/app1/". There are static files, maybe few custom php, and a single entry
> point `/index.php`.

I'm not sure what you're trying do to.

Maybe your question is clear to other people, in which case, perhaps
they'll answer.

If not, could you try again giving examples of "this url should result in
nginx serving this file", and "this url should result in nginx proxying
to this other url", and whatever else you want nginx to do?

> 1. what happens to an "alias" inside a "^~" location like "location ^~ /app1
> { ... }" – seems like $uri is not changed and "/abcdef" part remains in
> place.

It should do what the docs say -- http://nginx.org/r/alias

Can you describe what you see, and how it differs from what you
expect? (And show the config you use -- there's no "alias" in the sample
provided).

(Note that there are some bugs relating to "alias" and "try_files".)

> 2. how can I write a nested default "/" location after a rewrite and a
> regexp location? Got [emerg] errors when trying to write it like this:
> location ^~ /app1 {
> rewrite ^/app1/?(.*)$ /$1 break;
> location ~* \.(jpg|gif|png)$ { ...static files instructions... }
> location / { proxy_pass ...php files and folders go to Laravel... }
> }

I'm not sure that that combination is possible.

Are you trying to do something different from what

proxy_pass http://127.0.0.1:8081/;

would do?

Cheers,

f
--
Francis Daly francis@daoine.org

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

nested location, proxy, alias and multiple "/" locations

sergiks January 18, 2014 03:58PM

Re: nested location, proxy, alias and multiple "/" locations

Francis Daly January 18, 2014 08:32PM

Re: nested location, proxy, alias and multiple "/" locations

sergiks January 19, 2014 04:57AM

Re: nested location, proxy, alias and multiple "/" locations

Francis Daly January 19, 2014 06:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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