When i go to the website example.com website is visible, but once i go to the route for ex : example.com/ex/test
it’s not accessable.
for ex, if i go to example.com/upload it works fine…
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name ******* www.*******;
ssl_certificate /etc/ssl/cert.pem;
ssl_certificate_key /etc/ssl/key.pem;
root /var/www/html;
index index.html index.htm index.csr.html;
# Security headers
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
add_header X-XSS-Protection "1; mode=block";
# Proxy requests to backend for API
location /api {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
# Handle static uploads
location /uploads {
alias /root/angular-ssr/src/backend/uploads/;
autoindex on;
allow all;
try_files $uri =404;
}
# Serve Angular application
location / {
try_files $uri $uri/ /index.html =404;
}
# Specific handling for routes like /gifs
location /gifs {
try_files $uri $uri/ /index.html;
}
}
Any ideas how can i resolve this issue? or is the issue from nginx and should i find a issue in my angular project?