Search code examples
nginxyii2sendfile

Yii::$app->response->sendFile() not working on NGINX


I created a web site to share files in a protected way, son i put the files for download out of an accesible folder and when the user asks for download the web checks if it has permission and if it does the send the file using Yii::$app->response->sendFile() and on Apache works just fine, the thing is

When i tried the same code on NGINX the content of the file its throwed on the browser page instead of actually download the file... I had search for info about this but no one seens to have the same problem?

So...Does NGINX needs any specific config for me to be able to download the file this way?

Thanks in advance


Solution

  • Solved!!, it was an old PHP version, not NGINX