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?
Laravel file download not working on OVH, return 403
Related questions
- Disable or delete raw logs in Web Cloud Hosting (GDPR compliance)
28632
08.01.2026 18:18
- Change Hosting Main Domain
13306
05.06.2021 04:19
- 502 Bad Gateway nginx
12537
11.10.2020 15:59
- allow remote connections on the mysql
12449
15.02.2018 17:22
- Modification de CNAME
10594
23.04.2024 13:33
- Setting up nodejs runtime software application
10095
20.07.2018 08:05
- Internal Server Error
9273
23.06.2022 09:32
- PHP ini parameters
8831
17.03.2021 12:50
- Please welcome Cloud Web!
8820
09.01.2018 10:42
- Remote access to Wordpress mysql database
8501
30.05.2023 12:38