I have some very basic question about Symfony and VirtualHost.
I have my Symfony3 installed in E:/XAMPP/htdocs/icp
Everywhere i read, to setup VirtualHost, so I did it
<VirtualHost *:80>
DocumentRoot "E:/XAMPP/htdocs/icp/web/app_dev.php"
ServerName icp.com
When I now call icp.com in the browser, the project renders, but in the background the browser can't find the referenced CSS-files (no-route error).
When I delete the VirtualHost-entry and call the project via localhost/icp/web/app_dev.php, everything works finde.
My question now is, do I really need VirtualHost for local development? If not, how would I call a route/controller(?),.. i.e. ipc.com/mycontroller/mymethod/3 without VirtualHost??
Further there is the question, what did I wrong with my VirtualHost-config ??
Do I really need VirtualHost for local development?
It all depends on personal preference, if you want to open project with virtual host you can configure it like this if not keep like this localhost/icp/web/app_dev.php.
What did I wrong with my VirtualHost-config ??
You have issue in following line,
DocumentRoot "E:/XAMPP/htdocs/icp/web/app_dev.php"
DocumentRoot should not be pointing to file
, instead it should point to web
folder. Like this,
DocumentRoot "E:/XAMPP/htdocs/icp/web/"