I currently starting a (Symfony2) project where I have to use a different port for HTTP-Communication of the REST-API (JSON/XML) then the normal HTML-Content.
Is this possible? And what is the best practice? Can this be solved by (Symfony-) routing? Goal is to provide the REST-API just for "internal" use (traffic coming from an internal ethernet-connection) and to "block" traffic which comes from a external connection.
Additional info:
I add a route /api/user e.g. for the User Rest API and /api/projects for the Project Rest API.
Can I do something like?
<VirtualHost *:81>
DocumentRoot /var/www/html/[Symfony-Folder]/web/api
</VirtualHost>