Apache2 + Symfony4 +子文件夹=问题

时间:2018-06-19 13:14:28

标签: apache symfony

我想知道我该如何访问我的symfony应用 ipofmyserver/symfony1ipofmyserver/symfony2与apache2

我已经尝试过了,但是没用

<VirtualHost *:80>
    ServerName symfony1

    Alias "/symfony1" "/var/www/html/symfony1/public"
    DocumentRoot /var/www/html/symfony1/public
    <Directory /var/www/html/symfony1/public>
        AllowOverride None
        Require all granted
        Allow from All

        <IfModule mod_rewrite.c>
            Options -MultiViews
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^(.*)$ symfony1/index.php [QSA,L]
        </IfModule>
    </Directory>

    <Directory /var/www/html/symfony1/public/bundles>
        <IfModule mod_rewrite.c>
            RewriteEngine Off
        </IfModule>
    </Directory>
    ErrorLog /var/log/apache2/symfony1_error.log
    CustomLog /var/log/apache2/symfony1_access.log combined

    # optionally set the value of the environment variables used in the application
    SetEnv APP_ENV prod
    #SetEnv APP_SECRET <app-secret-id>
    SetEnv DATABASE_URL "mysql://root:@localhost/symfony
</VirtualHost>

该配置有效,但是当我继续使用/时,我有同样的事情,当我尝试继续进行symfony2时,它不起作用(与symfony1相同的配置)

如果有人可以帮助我

预先感谢

0 个答案:

没有答案