Hello I'm trying to run project using newest symfony on my localhost.
What i already did:
I added this to my vhosts file in Xampp.
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "F:\Programy\XAMP\htdocs\Anka\web"
ServerName Anka
DirectoryIndex app_dev.php
ErrorLog "logs/vark.local-error.log"
CustomLog "logs/vark.local-access.log" common
</VirtualHost>
I added this in my hosts file in Windows\System32...
127.0.0.1 Anka
This is what i see after typing
anka\
In my browser. My localhost website
And when i click on web i see this: web
Can somebody help me what else i should do to see normal Symfony index page?
Try http://anka/app_dev.php
or http://anka/web/app_dev.php
Also You can Change the directory to this one with the application and run:
php bin/console server:run
Then access http://localhost:8000/
in your browser
Like this:
https://symfony.com/doc/current/setup.html#running-the-symfony-application
First of all - ServerName
value is case-sensitive, to Apache is not really recognizing request as this VirtualHost and you're getting listing of root directory.
Use http://Anka
url, or change ServerName Anka
to ServerName anka
and 127.0.0.1 Anka
into 127.0.0.1 anka
.
Next thing is that you have some errors in your code and PHP cannot find AnkaBundle\AnkaBundle
class. You're probably missing an autoloader, but that's only my guess. Not enough information to be sure.