0

I have an angular application hosted in docker container. Few of the static contents are read from some other server so that the reverse proxy configuration has been put at path /etc/nginx/conf.d/ but the proxy config is not working.

Below is the proxy config

server {
 location /static/configs/ {
   proxy_pass http://somewebsite.com/static-data/configs
 }
}

Lets assume my application url is "http://angularapp.com/" Now if I access http://angularapp.com/static/configs/json/config.json then it is giving me HTTP 404 error.

I don't have rights to amend any other files on path /etc/nginx. I can only put conf file at conf.d and configuration in sites-enabled is already including the /etc/nginx/conf.d/*.conf files.

My application is installed on /opt/app/Web/ path and local resources on the path are accessible.

Akash Soni
  • 98
  • 1
  • 7
  • Check this similar [SO](https://stackoverflow.com/questions/54151255/why-do-i-get-404-on-nginx-reverse-proxy) and the [link](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass) ,which may help to resolve your issue. – Veera Nagireddy Jan 11 '23 at 05:58

0 Answers0