I created a project with Api platform 2.6 & Symfony 5.4 and then I uploaded it with FileZilla (FTP).
I followed the step to deploy a Symfonyproject update composer packages and change database in .env. I sent the project online so that it would be avalaible on a domain name like my-website.com. The symfony part works well but when I try to reach "my-website.com/api" I get code 404 even if I a set env=prod I get the 404 page.
Is there any action to activate/start api platfrom after deploying online ? Thanks !
CodePudding user response:
You should try composer composer require symfony/apache-pack
if your web server is running Apache.
See also : https://symfony.com/doc/current/setup/web_server_configuration.html
CodePudding user response:
Thanks for your help everybody !
I found the solution. I was missing a htaccess file in the /public directory. I found one here : https://github.com/symfony/recipes-contrib/blob/main/symfony/apache-pack/1.0/public/.htaccess
And from now routes work fine ! I just have to take a look at the htaccess to check the content