So, I am trying to build an platform that uses Symfony 4 as a backend service (only JSON api calls) and React as the frontend.
I am using cPanel and after building my React app in production mode I copy it in the public_html folder.
At the same time I create a folder called 'api' and throw Symfony backend code there. I've installed symfony/apache-pack and I can access my Symfony API at the following URL: 'mydomain.com/api/public/api/users' since the htaccess file that apache-pack created is located in the public folder.
However this is not what I want, I'd like to be able to access my API as 'mydomain.com/api/users' and also be able to reach React app by 'mydomain.com/login' (or any other route I create).
Is there any config I can do to make this work?
Should I simply switch my Symfony app to a subdomain like 'api.domain.com' and use that?