Welcome! Log In Create A New Profile

Advanced

Re: Help with locations and regex

October 21, 2017 01:41PM
Hi!

With your suggestions, I was able to get it - thank you! Here is what I ended up doing:

location = /admin { try_files /index.html =404; }
location ^~ /admin/ { alias /home/user/project/dist/; try_files $uri $uri/ /admin/index.html; }
location = / { # proxy_pass }
location ~ ^/[^/]+$ { # proxy_pass }

The results are perfect. I kinda wanted a single location to handle both admin cases, but it's not a big deal and the results are more important than the structure of the config, so I'm okay with it.

Thank you so much, you're the best!
-AC
Subject Author Posted

Help with locations and regex

anon59682 October 20, 2017 06:37PM

Re: Help with locations and regex

Francis Daly October 21, 2017 05:08AM

Re: Help with locations and regex

Francis Daly October 21, 2017 05:22AM

Re: Help with locations and regex

anon59682 October 21, 2017 01:41PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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