M
M
Maxim Lagoysky2018-09-21 10:33:40
symfony
Maxim Lagoysky, 2018-09-21 10:33:40

Why can't the page be found?

Good afternoon everyone, I had such a problem, installed symfony 4, added an annotation package, and twig. I create a SiteController controller in it, I create a method for the main page, and when I try to render a file along the site/index.html.twig path, it cannot find this template for some reason.
5ba49e0cb6a8b547066826.png
Here is the controller

<?php

namespace App\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Routing\Annotation\Route;

class SiteController extends Controller
{
    /**
     * @Route("/", name="index")
     */
    public function index()
    {
        return $this->render('site/index.html.twig');
    }
}

Maybe the problem is in the nginx settings?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Lagoysky, 2018-09-21
@lagoy

I found a solution, the site folder had permissions of 700...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question