Questions related to nginx location directive should use this tag.
Questions tagged [nginx-location]
1424 questions
2
votes
1 answer
Geoserver NGINX configuration
I'm new to Nginx and EC2 and trying to add some simple authentication as below. It's a one page app and i want to secure the access to the page but not the tile server. With no authentication all works well. With authentication as the below I get…

mapping dom
- 1,737
- 4
- 27
- 50
2
votes
1 answer
Nginx 405 Not allowed when another site redirects to my vue app
I have a online shop that has creditcard payment with 3Dsecure.
When 3D secure navigates back to my site using url example.com/confirmPage/token I get a 405 not allowed from Nginx.
If I visit the page direct from my browser there is no problem…

RFZees
- 105
- 1
- 12
2
votes
0 answers
Nginx how to match a dynamic location
I have a nginx config file with a server context and multiple location contexts. How can I get the / in one of the location contexts to match a route that is dynamically generated? It's dynamically generated because my application connects to an api…

Ryan Sam
- 2,858
- 4
- 19
- 30
2
votes
0 answers
How to provide bucket path for nginx?
I am trying to add new webpages to the existing website. These webpages (.html) are stored on s3 bucket. When I update the config on nginx, I get the The specified bucket does not exist error
Below is the config code:
location ~ ^/biz/(.*)$ {
…

Ravi
- 659
- 2
- 10
- 32
2
votes
1 answer
NGINX: Rewrite url and reverse proxy to a different port
I am having difficulty rewriting url and reverse proxy the request to a spring boot app. Rewrite works but i am losing port number and cause of that it is not working. For example
localhost:80/order.pl converts into localhost/home. The port gets…

djulb
- 375
- 1
- 3
- 19
2
votes
1 answer
Nginx: serve multiple React applications on the same server
I am trying to set up multiple React apps on the same server. The problem is that after I build the project, index.html from build/ is found, but the auxiliary files from build/static are not. Initially, with just one app, I had location static/…

Adrian Pop
- 1,879
- 5
- 28
- 40
2
votes
1 answer
Nginx how to apply proxy_ignore_headers Set-cookie only if matched location not-contains query string?
I need when requested URI of the same location (root, homepage - /) does not contain any (or specific) query strings, only then start caching and prevent set cookie in user browser, opposite the fact that proxied server was sending header…

Milos Xk
- 21
- 1
- 3
2
votes
1 answer
NGINX not routing calls from react app to backend app
I have an AWS Ubuntu server that hosts a react front end running at 127.0.0.1:4100 and makes api calls to a Go app using port 127.0.0.1:1323. I installed Nginx and setup proxy pass for these two ports in /etc/nginx/sites-available/default config…

dontke
- 99
- 3
- 10
2
votes
1 answer
nginx how to redirect to wordpress folder if url contains specific word
First of all my domain root is configured to serve an Angular webpage using a reverse proxy that redirects to local ip/port, that's working like a charm. The problem arrives now when I want to override root rule if url contains /blog which I want to…

Jordi
- 331
- 2
- 15
2
votes
1 answer
Serve Laravel application from nginx /location block (virtual host)
I am trying to serve laravel from a /location block in a Ubuntu nginx virtual host configuration. I have the laravel application installed and working fine when accessed directly but the nginx location block seems like not doing what it is expected…

RP McMurphy
- 704
- 8
- 30
2
votes
1 answer
Nginx for Angular not hitting the back-end api
I am using nginx to reverse proxy urls going to back-end server.
Here is my angular docker file:
FROM node as node
# set working directory
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app/package.json
RUN npm install
COPY…

dream123
- 129
- 3
- 14
2
votes
1 answer
LetsEncrypt on Nginx NET::ERR_CERT_COMMON_NAME_INVALID
I tried everything to solve this problem, but nothings seems work.
Spent hours banging on this problem.
I have Ubuntu 18.04 server with nginx 1.14.0.
I have multiple domain hosted in my server. Others domain are fine including that necommerce.online…

Debendra
- 1,132
- 11
- 22
2
votes
1 answer
Nginx location match multiple extensions unless path starts with specific word
How can I write a location block that matches any path ending in the following extensions:
jpg|jpeg|gif|css|png|js|ico|json|xml|txt|html
Unless the path starts with "/rails" (eg: /rails/randomstring/image.png)?
I currently have this basic…

Felipe Zavan
- 1,654
- 1
- 14
- 33
2
votes
1 answer
Support multiple index.html according to env nginx and Angular 5
I'm running Angular 5 and had to, according to the env build, change the index.html. So I went with multiple "apps":declaration inside angular-cli.json, where --app=0 has dev envs and --app=1 has prod envs.
The --app=1 has "index":…

João Ghignatti
- 2,281
- 1
- 13
- 25
2
votes
0 answers
Hosting frontend and backend on nginx
I am trying to host my AngularJs app and my dotnet core api on nginx but I'm unable to access my api, following is my default.conf in /etc/nginx/conf.d:
server {
listen 80 default_server;
listen [::]:80 default_server;
root…

Ali
- 1,648
- 2
- 26
- 48