I have uploaded a php shell using a file upload vulnerability. But when I hit the .php url after uploading it. It gets downloaded rather than executed. Why is that. And how can I execute my shell code?
This is the URL that it gets uploaded into: upload_dir/company/logo/8a2d9fee905e3ddb01906fb978c3268a/17198768259.jsp I have also tried with upload_dir/company/logo/8a2d9fee905e3ddb01906fb978c3268a/17198768259.js. But both of them just downloads my shellcode. Rather than executing it. What is the fix of it?
Also most of the files in the website comes with .js extension.

.phpextension, then a script with that extension will be executed as PHP code. Otherwise, it won’t, no matter how many different extensions you try.