K
K
Karina2015-08-25 23:25:03
symfony
Karina, 2015-08-25 23:25:03

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>

In httpd.conf on line 488 I uncommented:

Include etc/extra/httpd-vhosts.conf

At this address (/Users/prizmo/Documents/projects/list_employee/myproject) is the symphony project.
I added 127.0.0.1 listemployee.com to hosts. I
go to the address: listemployee.com - error 403.
I can't figure out what I forgot to do.
I actually forgot how it's done.
Thanks everyone for the replies.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaliy Orlov, 2015-08-25
@iKapex

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

K
Karina, 2015-08-26
@iKapex

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 question

Ask a Question

731 491 924 answers to any question