For some reason, on OVH my Laravel projects not working... and the code is actually pretty simple, just this route:
Route::get("test", function(){
$content = "test";
$headers =
'Content-type' => 'text/plain',
'Content-Disposition' => sprintf('attachment; filename="%s"', "test.txt"),
'Content-Length' => strlen($content)
];
return \Illuminate\Support\Facades\Response::make($content, 200, $headers);
});
Then, if I use wget to download this file, I get this:
--2021-11-02 20:26:14-- https:// mywebsite. me/test
Risoluzione di mywebsite. me (mywebsite. me)... 94.23.66.84
Connessione a mywebsite. me (mywebsite. me)|94.23.66.84|:443... connesso.
Richiesta HTTP inviata, in attesa di risposta... 403 Forbidden
2021-11-02 20:26:14 ERRORE 403: Forbidden.
If I add a Log::info("test") in my web.php the log is empty...
This makes me think that, first of all, is not laravel returning 403, and therefore the [server is completely ignoring the .htaccess and going "manually" checking if the file exists, and since there is not that file called test.txt, is returning 403
Are you aware of something like this? How can I solve this?
Cloud Web Hosting Plan - Laravel file download not working on OVH, return 403
Related questions
- Disable or delete raw logs in Web Cloud Hosting (GDPR compliance)
15513
08.01.2026 18:18
- allow remote connections on the mysql
7711
15.02.2018 17:22
- Change Hosting Main Domain
7571
05.06.2021 04:19
- 502 Bad Gateway nginx
7293
11.10.2020 15:59
- Setting up nodejs runtime software application
5550
20.07.2018 08:05
- Internal Server Error
5389
23.06.2022 09:32
- Modification de CNAME
5147
23.04.2024 13:33
- Please welcome Cloud Web!
4916
09.01.2018 10:42
- PHP ini parameters
4878
17.03.2021 12:50
- Error AH01797: client denied by server configuration
4875
07.02.2023 14:16