Skip to content
Advertisement

NGINX 404 not found but file exists

I want to call the index.html from the folder /var/www/fileUpload/html. The index.html file exists in that folder.

The / router works. the uploadFiles route as well. But when I open the upload route I get a 404 error.

JavaScript

Do you have any suggestions? Thank you!

Advertisement

Answer

That should be alias /var/www/fileUpload/html; otherwise Nginx is looking for the file in /var/www/fileUpload/html/upload/index.html. See this document for details.

For example:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement