Good, I have an environment with symfony3 installed and my intention is to make an api rest, use as web server NGINX and as a proxy reverse apache, that is to say in port 80 I have NGINX and in port 8080 Apache.
I have developed a test project with Symfony3.3 and if I run the command by console to see the routes I see the following
The controller I have created it in this way
<?php
namespace AppBundle\Controller\Api\v1;
use Symfony\Component\HttpFoundation\Request;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\BrowserKit\Response;
class UsuariosController extends Controller
{
/**
* @Route("/api/v1/nombre")
* @Method("POST")
*/
public function nombreAction(Request $request)
{
$nombre = $request->get('nombre');
return new response('its ok',201);
}
}
The routes file in yml format is this
app:
resource: '@AppBundle/Controller/'
type: annotation
oneup_uploader:
resource: .
type: uploader
Now I have the problem when trying to execute this function of the controller with the POST method for it by using POSTMAN I make a call to link
Thanks