I have deployed my Symfony 5 app on live server (production). I left my .env
file with DEV variables.
Firstly my my homepage index.php
was showing 404 URL not found on the server
, so I had to execute ln -s public_src public
and since that my homepage was showing fine.
However I required and implemented a NelmioApiDocBundle via composer and now my API doc route /api/doc
is working only on localhost, on live server (production) the browser says 404 URL not found on the server
.
How to fix it? Does it need another symlink?
Advertisement
Answer
You need to set the .htaccess file under public folder.