Hi All,
Quick Q: Why does the following config not work ie NginX is returning a
404 when I attempt to access a php file/page from the "/common/" location?
Obviously I'm misunderstanding something about how location directives
work :-)
~~~
location /common/ {
root /www;
Hello,
On Mon, 26 Feb 2024 09:55:10 +0100
"Roberto D. Maggi" wrote:
> Hi you all,
>
> I'm trying to improve the reverse proxy's virtual hosts' configuration
> files of my company,
>
> but I'm facing an issue that I can't understand:
>
Hi you all,
I'm trying to improve the reverse proxy's virtual hosts' configuration
files of my company,
but I'm facing an issue that I can't understand:
In the "location / " block I inserted these lines
location ~*
^.+\.(eot|otf|woff|woff2|ttf|rss|atom
imply work and the second blocks
>
> --> here I'm trying to add this header only to cgi|shtml|phtml|php
> extensions
>
> location ~* \.(?:cgi|shtml|phtml|php)$ {
> add_header Cache-Control "public";
> client_max_body_size 0;
> chunked_transfe
Hi you all,
I'm having a problem with these two stanzas, in writing down a virtual
host and can't figure out what's wrong with them.
They look correct but the first doesn't simply work and the second blocks
--> here I'm trying to add this header only to cgi|shtml|phtm
Hi Team,
We are looking for restricting the http method for all location and enable the
same for specific location, I found the way in Apache http server, I am unable
to find the same in NGINX, can you please guide me here, how to achieve it.
Code snippet works in Apache Http server
On Thu, May 18, 2023 at 09:14:42PM -0700, Palvelin Postmaster via nginx wrote:
Hi there,
> My goal is to serve only requests which include URI /files/hash/*
> using a separate location block. Everything else should be served by
> the default location block I included in my previou
e configuration file how to do this. Below is the sample
> configuration for the server ignapp. Can you please help me how to
> configure the below settings for another upstream server. Below is the
> config setting for ignapp same way I need to do it for creating location ~
> /da
with nginx.
>>>
>>> My PHP app serves files which have hashed filenames and no filename
>>> extension from a specific subdirectory url, e.g
>>> /files/hash/31b4ba4a0dc6536201c25e92fe464f85
>>>
>>> I would like to be able to set, for exampl
o filename
> > extension from a specific subdirectory url, e.g
> > /files/hash/31b4ba4a0dc6536201c25e92fe464f85
> >
> > I would like to be able to set, for example, a separate ’expires’ value to
> > these files with nginx (using a separate location block?). Is that
ory url, e.g
> /files/hash/31b4ba4a0dc6536201c25e92fe464f85
>
> I would like to be able to set, for example, a separate ’expires’ value to
> these files with nginx (using a separate location block?). Is that achiavable?
>
> server {
> listen 443 ssl http2;
> se
with nginx (using a separate location block?). Is that achiavable?
server {
listen 443 ssl http2;
server_name my.site.com;
root /var/www/vhosts/my.site.com/site/;
set $ngspage /index.php?ngspage=$uri$is_args&$args;
# PHP file processing configura
rization.
>
> Good luck
> -Payam
>
> On Mon, Feb 20, 2023 at 4:35 AM Francis Daly wrote:
>
>> On Sun, Feb 19, 2023 at 09:33:46AM -0500, Saint Michael wrote:
>>
>> Hi there,
>>
>> > it does not work:
>> > 404 Not Found
>>
>> I
;
> Hi there,
>
> > it does not work:
> > 404 Not Found
>
> It appears that you are not asking "how do I ensure that a location{}
> can only be used for internal redirects/requests".
>
> > in the public location, /carrier_00163e1bb23c, I hav
On Sun, Feb 19, 2023 at 09:33:46AM -0500, Saint Michael wrote:
Hi there,
> it does not work:
> 404 Not Found
It appears that you are not asking "how do I ensure that a location{}
can only be used for internal redirects/requests".
> in the public location, /carrier_0
Thanks for your patience.
I publish a report, which takes 1 minute to complete.
So I send the users to a spinner, which has an Iframe inside.
While the spinner spins, the iframe runs the report from the /internal
location.
Once the report is ready, the spinner hides the div and replaces the
ands of times before.
>>>>
>>>> Your 404 is expected error code when you are accessing the website from
>>>> external.
>>>>
>>>> Also, read
>>>> https://nginx.org/en/docs/http/ngx_http_access_modul
;>
>>> Your 404 is expected error code when you are accessing the website from
>>> external.
>>>
>>> Also, read
>>> https://nginx.org/en/docs/http/ngx_http_access_module.html
>>>
>>>
>>>
>>>
>>
code when you are accessing the website from
>> external.
>>
>> Also, read
>> https://nginx.org/en/docs/http/ngx_http_access_module.html
>>
>>
>>
>>
>> On Sun, Feb 19, 2023 at 6:34 AM Saint Michael wrote:
>>
>>> Dear Francis
>&g
> external.
>
> Also, read
> https://nginx.org/en/docs/http/ngx_http_access_module.html
>
>
>
>
> On Sun, Feb 19, 2023 at 6:34 AM Saint Michael wrote:
>
>> Dear Francis
>> it does not work:
>> 404 Not Found
>>
>> this is my cod
/docs/http/ngx_http_access_module.html
On Sun, Feb 19, 2023 at 6:34 AM Saint Michael wrote:
> Dear Francis
> it does not work:
> 404 Not Found
>
> this is my code
> location /asr {
> default_type 'text/html; charset=UTF-8';
> internal;
>
>
Dear Francis
it does not work:
404 Not Found
this is my code
location /asr {
default_type 'text/html; charset=UTF-8';
internal;
}
location /carrier_00163e1bb23c {
default_type 'text/html; charset=UTF-8';
....
}
in the public location, /carrier_00163e1bb23
On Sun, Feb 19, 2023 at 01:52:12AM -0500, Saint Michael wrote:
Hi there,
> it fails with forbidden. But I am using only from another location inside
> the same server.
>
> How do I protect internal service locations and at the same time use them?
If you are asking "how d
>
> I have two locations
/x
/yy
the public one is /y, nobody is supposed to access /x from the
Internet.
Inside /, I call /x, but if I do this:
location /asr {
default_type 'text/html; charset=UTF-8';
allow 127.0.0.1;
deny all;
it fails with for
single C subnet 10.48.0.1-254).
>
> Then again, your whole configuration would be simpler with just a single
> location block (since it doesn't seem you have an application which uses
> /auth without a trailing slash):
>
> location /auth/ {
> allow 172.20.0.
sure how to
organise or set the right sequence here.
Just from the log it seems correct - you have a rule to allow 10.48.0.0/24; but
the ip 10.48.11.9 doesn't go within that subnet (/24 subnet mask is just a
single C subnet 10.48.0.1-254).
Then again, your whole configuration would be simpler
Thanks Daniel for the reply.
I have attached my config file for reference in a previous reply.
On Wed, Jan 25, 2023 at 10:58 AM nanaya wrote:
> Just adding, if it's `location /auth {}`, it'll also match /autha, /authb,
> /authsomething/something, not just limited to /auth/*.
&g
/admin, /auth/admin/
> and few more which have the same rules. I am trying to restrict access to
> /auth and /auth/admin which are sensitive for public access. Do you think
> removing "=" can help in this case?
>
>
> '=' in location definition means that nginx w
Just adding, if it's `location /auth {}`, it'll also match /autha, /authb,
/authsomething/something, not just limited to /auth/*.
On Wed, Jan 25, 2023, at 01:56, Reinis Rozitis wrote:
>> There are other locations like /auth, /auth/, /auth/admin, /auth/admin/ and
>> few mo
> There are other locations like /auth, /auth/, /auth/admin, /auth/admin/ and
> few more which have the same rules. I am trying to restrict access to /auth
> and /auth/admin which are sensitive for public access. Do you think removing
> "=" can help in this case?
n Mon, Jan 23, 2023 at 6:08 PM Reinis Rozitis wrote:
> > I am trying to restrict some Location block in my Nginx configuration to
> > specific IPs. Below are the changes I made -
> >
> >location = /auth {
> > }
> >
> > Here, the deny
>
> Hope this helps.
>
> Ian
>
> On 23/01/2023 16:34, sandeep dubey wrote:
> > Hello,
> >
> > I am trying to restrict some Location block in my Nginx configuration to
> > specific IPs. Below are the changes I made -
>
> I am trying to restrict some Location block in my Nginx configuration to
> specific IPs. Below are the changes I made -
>
>location = /auth {
> }
>
> Here, the deny rule is not working. Users are still able to access the
> page publicly. Am I mis
think
you need 1.2.3.4/24 which allows all of the format
1.2.3.*
Hope this helps.
Ian
On 23/01/2023 16:34, sandeep dubey wrote:
Hello,
I am trying to restrict some Location block in my Nginx configuration to
specific IPs. Below are the changes I made -
Version: nginx:1.21.0
location
Hello,
I am trying to restrict some Location block in my Nginx configuration to
specific IPs. Below are the changes I made -
Version: nginx:1.21.0
location / {
> proxy_pass http://127.0.0.1:8080;
> }
>
location = /auth {
> proxy_pass http://12
This worked great. Thank you for your help!
Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,294407,294929#msg-294929
___
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-le...@nginx.org
g there would be of the form
location ~ announce {}
but only in a place where that location will actually have a chance to
be matched -- so before any other ~regex location that might match the
same request; and any =exact location, or ^~prefix location that is
the longest-prefix match, will mean that
I am trying to weed out requests for any uri that contains the string,
"announce" (no quotes). That would include
* /announce
* /announce/
* /announce.php
each with or without query strings. I have the following location blocks
in my server context:
location ~
>
> limit_req_zone $binary_remote_addr zone=one:1m rate=2r/m;
>
> server {
>
> listen 80;
> server_name localhost;
>
> location / {
> # set rate limiting for this location
> limit_req zone=one burst=10 nodelay;
> limit_
80;
server_name localhost;
location / {
# set rate limiting for this location
limit_req zone=one burst=10 nodelay;
limit_req_dry_run on;
add_header X-my-var "$myvar" always;
if ($limit_req_status = "REJECTED_DRY_RUN") {
Thank you Sergey! I tried every thing I could think of, but I couldn’t
think of giving the new directory the correct permissions. Thanks again!
___
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-le...@nginx.org
viously, I'm doing something stupid. Is it really impossible to have
> both a documents and an images directory>
[...]
>
> location /images/ {
> root /data;
> }
> location /documents/ {
> root /data;
> }
L
s and an images directory>
Jim Taylor
server {
listen 443 ssl;
server_name www.jstaylor.com;
ssl_certificate /etc/nginx/ssl/combined.crt;
ssl_certificate_key /etc/nginx/ssl/jstaylor.key;
location / {
try_files $uri $u
sted a question:
> > >
> > >
> > https://unix.stackexchange.com/questions/678060/nginx-proxy-pass-only-
> > works-for-root-location
> >
> > First of all you may want to define "won't work". What exactly
> > happens, what goes wrong?
> >
Maxim Dounin Wrote:
---
> Hello!
>
> On Thu, Nov 18, 2021 at 05:51:08AM -0500, gunitinug wrote:
>
> > Hello. I posted a question:
> >
> >
> https://unix.stackexchange.com/questions/678060/nginx-proxy-pas
Hello!
On Thu, Nov 18, 2021 at 05:51:08AM -0500, gunitinug wrote:
> Hello. I posted a question:
>
> https://unix.stackexchange.com/questions/678060/nginx-proxy-pass-only-works-for-root-location
First of all you may want to define "won't work". What exactly
happens
Hello. I posted a question:
https://unix.stackexchange.com/questions/678060/nginx-proxy-pass-only-works-for-root-location
Thanks.
Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,292884,292884#msg-292884
___
nginx mailing list
nginx
o the essentials and with a few
> substitutions
> > of actual URIs).
> >
>
> Well, ngx_proxy module's directive inheritance is in action here,
> which gives you nice side effects that you want :)
>
> I'll analyze some examples here such that people *may* get
;ve found to intercept errors is not
> > > using the @location but I want to use it to simplify the
> > > configuration.
> >
> > Depending on how you understand "simplify" -- you could potentially
> > "include" a file with the common pieces an
Hi Francis...
On Thu, Sep 16, 2021 at 7:37 PM Francis Daly wrote:
>
> On Thu, Sep 16, 2021 at 04:25:59PM -0300, Fabiano Furtado Pessoa Coelho wrote:
>
> Hi there,
>
> > Is it possible to use "proxy_intercept_errors on" with @location?
>
> Yes; but it is
On Thu, Sep 16, 2021 at 04:25:59PM -0300, Fabiano Furtado Pessoa Coelho wrote:
Hi there,
> Is it possible to use "proxy_intercept_errors on" with @location?
Yes; but it is only useful if "proxy_pass" sees the
"proxy_intercept_errors". Which means: if the
Hello...
I have the following issue...
Is it possible to use "proxy_intercept_errors on" with @location?
Invalid config:
location /images/ {
proxy_intercept_errors on;
try_files $uri @backend;
}
location / {
try_files $uri @backend;
}
locatio
On Tue, Apr 13, 2021 at 05:47:07AM -0400, vybralk wrote:
Hi there,
> i have ngnix in front of java web server. My request is correctly send by
> ngnix to java web, which redirect user request to another url as user is not
> authenticated. It set location header to following value
>
i have ngnix in front of java web server. My request is correctly send by
ngnix to java web, which redirect user request to another url as user is not
authenticated. It set location header to following value
location =
https://login.server.com/oidc/2/auth?response_type=code&client_id=123&a
On Thu, Apr 08, 2021 at 04:36:47PM -0400, uragnorson wrote:
Hi there,
> location / {
> root /usr/share/nginx.html;
> }
>
> location /dist/ {
> alias /usr/share/nginx/html/dist/;
> }
Because, in this case, the "location" part matches the end of the "alias&qu
On RHEL I have,
location / {
root /usr/share/nginx.html;
}
location /dist/ {
alias /usr/share/nginx/html/dist/;
}
I am able to navigate to http://server/dist but in dist the index.html is
looking for http://server/js but it should be http:/server/dist/js is there
a way to add the extra "
Hello!
On Wed, Apr 07, 2021 at 05:16:20PM -0700, Demitrious Kelly wrote:
> Thanks very much. It was not an easy thing to google to get
> from symptom to bug report :) From the text in the ticket it
> sounds like the named capture functions as intended and if this
> bug gets fixed the numeric
gin forwarded message:
>
> From: Maxim Dounin
> Subject: Re: Capturing Encoded Location Variable Data
> Date: April 7, 2021 at 4:13:58 PM PDT
> To: nginx@nginx.org
> Reply-To: nginx@nginx.org
>
> Hello!
>
> On Wed, Apr 07, 2021 at 03:07:34PM -0700, Demitrious Kelly
Hello!
On Wed, Apr 07, 2021 at 03:07:34PM -0700, Demitrious Kelly wrote:
> Given the following two location configurations:
>
> location ~ ^/test/named/(?.+)$ {
> return 200 $foo;
> }
>
> location ~ ^/test/numbered/(.+)$ {
> set $foo $1;
> return 200 $foo;
Hello,
Given the following two location configurations:
location ~ ^/test/named/(?.+)$ {
return 200 $foo;
}
location ~ ^/test/numbered/(.+)$ {
set $foo $1;
return 200 $foo;
}
Are the following two results expected?
# curl http://127.0.0.1:8088/test/named/%D7%94%D7%98%D7%99%D7%95%D7%9C
Hi all,
I may be missing some crucial request processing knowledge, but I am trying
to issue an authentication request with variable URI, as as part of
processing a request for a protected resource. I hope I am able to express
below what I want:
```
location ~ /foo/(\d+)/bar {
auth_request
Thank you for the pointer.
Looks like the problem has been resolved. The location needed a trailing “/“
on the path.
location ^~ /.well-known/acme-challenge/ {
allow all;
alias /var/www/certbot/;
try_files $uri =405;
}
John
Working
.1", host: "cyva.lese-fowler.us"
"alias" does a straight textual swap of the part in "location" for the
part in "alias".
Either both should end in /, or neither should. (Usually, both should.)
> 2021/03/20 21:44:21 [error] 14#14: *7 open() "/var/w
ps://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header Referrer-Policy "no-referrer" always;
On Fri, Mar 19, 2021 at 03:01:19PM -0700, John Fowler wrote:
Hi there,
> I have nginx running in a docker container and configured to use let’s
> encrypt for certificates services.
> The location redirect to /var/www/certbot from /.well-known/acme-challenge
> does not seem to work
Good Day,
I have nginx running in a docker container and configured to use let’s encrypt
for certificates services.
The location redirect to /var/www/certbot from /.well-known/acme-challenge does
not seem to work.
Shown below is the contents of the target location and the contents
On Tue, Dec 15, 2020 at 07:42:00PM +0200, Gregory Edigarov wrote:
Hi there,
> I have this server section:
...
> now I need to convert this virtual server to location.
> i.e. to be called from postmaster.example.com/control/
you will probably want to wrap your current relevant location
Hello everybody,
I have this server section:
server {
server_name postmaster.example.com;
listen 80;
access_log /var/log/nginx/vexim-access.log;
error_log /var/log/nginx/vexim-error.log;
root /var/www/vexim/vexim;
index index.php index.htm index.html;
location
On Tue, Nov 10, 2020 at 02:54:26AM +0100, Grzegorz Kulewski wrote:
> W dniu 10.11.2020 o 01:19, Francis Daly pisze:
Hi there,
> > So my config file can include (e.g.)
> >
> > location ^~/<200b> { return 200 "match /zwsp ($uri, $request_uri)\n"; }
> >
y to match things like: %e2%80%8b in URL in location?
>
>>> here is the code snippet (not tested):
>>>
>>> location ~ ^/\xE2\x80\x8E {
>>> return 200 "%e2%80%8b matched\n"/;
>>> }
>>
>> Thank you. It works.
>>
>
On Tue, Nov 10, 2020 at 12:11:28AM +0100, Grzegorz Kulewski wrote:
> W dniu 09.11.2020 o 21:10, Sergey A. Osokin pisze:
> > On Mon, Nov 09, 2020 at 03:47:13PM +0100, Grzegorz Kulewski wrote:
Hi there,
> >> Is there any (sane) way to match things like: %e2%80%8b in URL in loca
W dniu 09.11.2020 o 21:10, Sergey A. Osokin pisze:
> On Mon, Nov 09, 2020 at 03:47:13PM +0100, Grzegorz Kulewski wrote:
>> Hello,
>>
>> Is there any (sane) way to match things like: %e2%80%8b in URL in location?
>> Thank you in advance.
>
> Hi Grzegorz,
>
&g
On Mon, Nov 09, 2020 at 03:47:13PM +0100, Grzegorz Kulewski wrote:
> Hello,
>
> Is there any (sane) way to match things like: %e2%80%8b in URL in location?
> Thank you in advance.
Hi Grzegorz,
here is the code snippet (not tested):
location ~ ^/\xE2\x80\x8E {
return 200 "
Hello,
Is there any (sane) way to match things like: %e2%80%8b in URL in location?
Thank you in advance.
--
Grzegorz Kulewski
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
t;/TEST/" or "TEST=" or
"=TEST" anywhere in the url, you could add the three lines
~/TEST/ 0;
~TEST= 0;
~=TEST 0;
inside the map.
> I tried to use something like " if ($args = TEST) { allow all;}",
> but Nginx gives error " directive is not
VICE=TEST (allo to all)
https:/domain.com/prod/INDEX.apw?TEST=123 (allow to all)
https:/domain.com/prod/something/TEST/index.html (allow to all)
how to do this?
I tried to use something like " if ($args = TEST) { allow all;}",
but Nginx gives error " directive is not allowed here
Request,
*>* e.g. $req_has_somecookie, and I want to be able to use proxy_cache only for
*>* specific URIs, e.g. /slow-page/ if the variable is 0.
*> >* I know that "if" is evil as it creates a new location scope.
*> >* What's the best way to handle this?
*
Probab
gt; I know that "if" is evil as it creates a new location scope.
>
> What's the best way to handle this?
Probably some combination of http://nginx.org/r/proxy_cache_bypass and
http://nginx.org/r/proxy_no_cache
You may want to change your variable-setting logic; or use a map
(h
Hello,
I have a variable that shows if a certain cookie exists in the Request,
e.g. $req_has_somecookie, and I want to be able to use proxy_cache only for
specific URIs, e.g. /slow-page/ if the variable is 0.
I know that "if" is evil as it creates a new location scope.
What's
Hello,
I want to call REST endpoint after successful (200/201) status from
upstream server. For error cases, I know we can use error_page/try_files
etc. But for success cases, I did not find any directive to use. I read
about `mirror` which can be used to call another server before making the
cal
I misread what you were trying to achieve thanks to no coffee this morning.
> I do not want to include my file into any server directive.
You have **no choice** but to specifically include your location
snippets where you want them. Location blocks can't be applied
'globally'
Does not work.
cat /etc/nginx/conf.d/git.conf
## Disable .htaccess and other hidden files
server {
listen 80 default_server;
server_name _;
location ~ /\.git {
return 404;
}
location ~ /\.(?!well-known).* {
deny all;
access_log off;
log_not_found off;
}
}
Result is
27;t match any other server_name Host so...)
Thomas
On 6/9/20 11:14 AM, basti wrote:
> Hello,
>
> i want to setup a location match for any hostname/servername like in apache:
>
> cat /etc/apache2/conf-enabled/git.conf
> RedirectMatch 404 /\.git
>
> In nginx I try
>
>
Hello,
i want to setup a location match for any hostname/servername like in apache:
cat /etc/apache2/conf-enabled/git.conf
RedirectMatch 404 /\.git
In nginx I try
cat /etc/nginx/conf.d/git.conf
server {
## Disable .htaccess and other hidden files
location ~ /\.(?!well-known).* {
deny
On Thu, May 14, 2020 at 11:10:20AM -0700, PGNet Dev wrote:
Hi there,
> editing a general location match to exclude one, specific instance?
It is usually easier to use positive matches instead of negative ones.
> I've had a trivial 'protection' rule in place for a long tim
> Second, it's all in the location documentation:
I'm not asking about the order.
I'm asking about a specific match(es) that'd work in this specific case.
If it's trivial, care to share a working example?
___
nginx maili
First, you forgot to escape the period in settings.php to settings\.php
> I'd like to edit the match to PASS that^ logged match -- as
> specifically/uniquely as possible -- but CONTINUE to 'deny all'
> for all other/remaining matches on "config".
Second, it
editing a general location match to exclude one, specific instance?
I run nginx 1.18.0.
I've had a trivial 'protection' rule in place for a long time
location ~*
(gulpfile\.js|settings.php|readme|schema|htpasswd|password|config) {
deny all;
}
Tha
> In particular, if limit_req uses a map with regular expressions,
> this might result in $1.$2 to be set to something completely
> different from what was expected from the location matching.
>
> The general rule is: avoid using positional captures from regular
> expressio
Hello!
On Sun, Apr 26, 2020 at 09:59:03AM -0500, J.R. wrote:
> I skimmed over the ngx_http_limit_req_module.c and didn't see anything
> obvious in relation to file checking, but here's my scenario...
>
> I have a location block that will re-write the requested 've
I skimmed over the ngx_http_limit_req_module.c and didn't see anything
obvious in relation to file checking, but here's my scenario...
I have a location block that will re-write the requested 'versioned'
file name to the actual common file name, so I can set some things
immu
onfig
rewrite ^/(admin)$ /$1/ last;
location /admin/ {
index index.html;
root /front;
try_files $uri admin/index.html; #direct all request
to index.html
}
and the errors:
2020/04/22 08:35:13 [error] 73#73: *1 open() "/frontindex.html"
Hello!
On Wed, Apr 22, 2020 at 11:46:25AM +0300, Gregory Edigarov wrote:
> Hello, Everybody
>
> this is directory structure:
>
> /front/admin/index.html
>
> /front/superadmin/index.html
>
> that's what I have in config
>
> rewrite ^/(ad
On 2020-04-22 11:46, Gregory Edigarov wrote:
Hello, Everybody
this is directory structure:
/front/admin/index.html
/front/superadmin/index.html
that's what I have in config
rewrite ^/(admin)$ /$1/ last;
location /admin/ {
index index.html;
root /
Hello, Everybody
this is directory structure:
/front/admin/index.html
/front/superadmin/index.html
that's what I have in config
rewrite ^/(admin)$ /$1/ last;
location /admin/ {
index index.html;
root /front;
try_files $uri admin/index
On Thu, Feb 27, 2020 at 02:20:45PM -0500, stmx38 wrote:
Hi there,
> 1. "~*" to be "~^"
> The first one looks like Nginx regexp we can use for locations, but the
> second one not (^~):
"map" is documented at http://nginx.org/r/map
"~" means "this arg is a regex, not a string". "~*" means "and th
/community/tutorials/understanding-nginx-server-and-location-block-selection-algorithms
2. It seems that the order of records in map is important. We pass required
queries with args, we block then all queries with args and allow without
args a then default value is applied. Maybe you can provide more deta
On Tue, Feb 25, 2020 at 05:06:15PM +, Francis Daly wrote:
> On Tue, Feb 25, 2020 at 07:05:05AM -0500, stmx38 wrote:
Hi there,
two corrections to my suggestion...
> > For location /test we should permit only POST, for /test?doc we should
> > permit only GET methods.
&
On Tue, Feb 25, 2020 at 07:05:05AM -0500, stmx38 wrote:
Hi there,
> We have a case when we should permit different methods on the same location
> but different requests.
The nginx model does "location" matching without reference to the
query string.
But you may be able to buil
Hello,
We have a case when we should permit different methods on the same location
but different requests.
For location /test we should permit only POST, for /test?doc we should
permit only GET methods.
Our config example:
location /test {
error_page 403 =405 /custom-error
1 - 100 of 757 matches
Mail list logo