I am trying to implement a proxy using the nginx configuration
The idea is to have a http server hosting my website (my SPA). and having one route on my http server pointing to another api.
this is my nginw configuration file below
client_max_body_size 100M;
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html index.htm;
location ^~ /proxyapi/ {
proxy_read_timeout 180s;
proxy_send_timeout 180s;
proxy_pass http://localhost:5000/;
}
location ~* /static/* {
try_files $uri =404;
expires 1y;
access_log off;
add_header Cache-Control "public";
}
# Any route that doesn't have a file extension (e.g. /devices)
location / {
try_files $uri $uri/ /index.html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
it works fine most of the time
when I call http://my-nginx-host/proxyapi/search/login, it works...
unless there is a dot in the login
http://my-nginx-host/proxyapi/search/login => works fine
http://my-nginx-host/proxyapi/search/log.in => fails with a "404 resource not found"
is there any way to make it work? I couldn't find any solution