0

I was testing two configurations of apache2 *.conf file and in first example everything ok, but i can't get public pictures in web folder like favicon or any other images in web folder.

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName project2
        DocumentRoot /var/www/project2/web/app_dev.php
<Directory /var/www/project2/web>
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

In second case i cahnge DocumentRoot /var/www/project2/web/app_dev.php to DocumentRoot /var/www/project2/web and i can get pictures, but controller returns internal server error when i'm using {ff} some variables in route

/**
 * 
 * @Route("/{ff}",name="home")
 */

This code @Route("/{ff}",name="home") don't work if i use recommended syntax in apache configuration. How to configure apache?

1 Answer 1

1

The official Symfony documentation features a detailed article on how to set up Apache for Symfony: http://symfony.com/doc/current/setup/web_server_configuration.html

Also, be sure to enable mod_rewrite in your httpd.conf.

Sign up to request clarification or add additional context in comments.

1 Comment

@fonjeekay If this answer helped you to resolve the issue please accept it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.