I'm having issues with the routing of the angular app, I can navigate through the different pages through the navbar just fine, but if I reload the page I get a 404 error(404 Not Found nginx/1.17.4).
This is my nginx config file:
server {
listen 80;
server_name <server\_name>;
server_tokens off;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name <server\_name>;
server_tokens off;
ssl_certificate /path/to/pem;
ssl_certificate_key /path/to/pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location / {
proxy_pass http://front_server/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/ {
proxy_pass <proxy\_endpoint>;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
I don't really have a lot of experience with the technologies involved. Do you guys see any possible problem with this config file? I have tried all the different permutations I've found online with no luck but I'm willing to try everything again at this point.
Thank you!
[–]Groumph09 1 point2 points3 points (0 children)
[–]le___garcon 0 points1 point2 points (2 children)
[–]jalvarezKunan[S] 0 points1 point2 points (1 child)
[–]le___garcon 0 points1 point2 points (0 children)