Answer the question
In order to leave comments, you need to log in
How to setup apache server for symfony?
Here is my complete httpd-vhosts.conf:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName listemployee.com
DocumentRoot "/Users/prizmo/Documents/projects/list_employee/myproject/web"
DirectoryIndex index.php
<Directory "/Users/prizmo/Documents/projects/list_employee/myproject/web">
Allow from All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Include etc/extra/httpd-vhosts.conf
Answer the question
In order to leave comments, you need to log in
1) try messing up the config and reloading apache to make sure the config works at all
2) try visiting listemployee.com/app_dev.php , if it does, then mod_rewrite is not enabled or not working, or something with the web/.htaccess file
3) check so that apache has permission to read the directory \your-long-path\web
Correct answer: click on the project folder and check the Shared folder checkbox.
For Mac, your config should look like this:
<VirtualHost *:80>
ServerName listemployee.com
DocumentRoot "/Users/prizmo/Documents/projects/list_employee/myproject/web"
DirectoryIndex index.php
<Directory "/Users/prizmo/Documents/projects/list_employee/myproject/web">
Require all granted
</Directory>
ErrorLog /Users/prizmo/Documents/projects/list_employee/myproject/apache-error.log
CustomLog /Users/prizmo/Documents/projects/list_employee/myproject/apache-access.log
</VirtualHost>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question