• Symfony на virtualHost?

    @zudwamorrison Автор вопроса
    Спасибо за помощь, действительно проблема в .htaccess.
    В итоге, правда, все записал в конфиг VirtualHost
    <VirtualHost *:80>
            ServerName symfony.test
            ServerAdmin webmaster@localhost
    
            DocumentRoot /var/www/projecty/web
    
            <Directory />
                    Options FollowSymLinks
                    AllowOverride None
            </Directory>
            <Directory /var/www/project/web/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride ALL
                    Order allow,deny
                    allow from all
                    DirectoryIndex app_dev.php
                    <IfModule mod_rewrite.c>
                            RewriteEngine On
                            RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
                            RewriteRule ^(.*) - [E=BASE:%1]
                            RewriteCond %{ENV:REDIRECT_STATUS} ^$
                            RewriteRule ^app_dev.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]    ##### this is the part that you should tweak, have th$
                            RewriteCond %{REQUEST_FILENAME} -f
                            RewriteRule .? - [L]
                            RewriteRule .? %{ENV:BASE}/app_dev.php [L]        ##### this is the part that you should tweak, have the .htaccess $
                    </IfModule>
                    <IfModule !mod_rewrite.c>
                            <IfModule mod_alias.c>
                                    # When mod_rewrite is not available, we instruct a temporary redirect of
                                    # the startpage to the front controller explicitly so that the website
                                    # and the generated links can still be used.
                                    RedirectMatch 302 ^/$ /app.php/
                                    # RedirectTemp cannot be used instead
                            </IfModule>
                    </IfModule>
            </Directory>
    
            ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
            <Directory "/usr/lib/cgi-bin">
                    AllowOverride None
                    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                    Order allow,deny
                    Allow from all
            </Directory>
            ErrorLog ${APACHE_LOG_DIR}/project.error.log
    
            # Possible values include: debug, info, notice, warn, error, crit,
            # alert, emerg.
            LogLevel debug
    
            CustomLog ${APACHE_LOG_DIR}/project.access.log combined
    Ответ написан
    Комментировать