Symfony2 AngularJS无法删除web/app_dev.php

Symfony2 AngularJS无法删除web/app_dev.php,php,angularjs,apache,.htaccess,symfony,Php,Angularjs,Apache,.htaccess,Symfony,我有一个Symfony AngularJS应用程序,我在VPS上托管了它。我使用softalicious安装了Symfony,它在快速运行方面做得很好 我现在的处境 显示: 工作 每次我尝试删除web/app_dev.php时,都会出现上述错误 我尝试了以下方法 已将DocumentRoot更改为web/ 将RewriteBase/添加到项目根.htaccess 已将RewriteBase/web/添加到web文件夹。htaccess 将RewriteBase/添加到项目根.htaccess

我有一个Symfony AngularJS应用程序,我在VPS上托管了它。我使用softalicious安装了Symfony,它在快速运行方面做得很好

我现在的处境

显示:

工作

每次我尝试删除web/app_dev.php时,都会出现上述错误

我尝试了以下方法

  • 已将DocumentRoot更改为web/
  • 将RewriteBase/添加到项目根.htaccess
  • 已将RewriteBase/web/添加到web文件夹。htaccess
  • 将RewriteBase/添加到项目根.htaccess
  • 已将RewriteBase/web/添加到web文件夹。htaccess
早些时候也可以,但是上面的一个或者其他原因导致它开始抛出500内部服务器错误

我在项目根目录和web文件夹中有一个默认的.htaccess,我将其附加如下以供参考(它不是太大,大部分是注释):

希望这有助于调试问题

更新

我尝试从项目根目录中删除.htaccess文件,结果如下:

.git/
.gitignore
LICENSE
README.md
UPGRADE-2.2.md
UPGRADE-2.3.md
UPGRADE-2.4.md
UPGRADE-2.8.md
UPGRADE.md
bin/
cgi-bin/
components/
composer.json
composer.lock
composer.lock.orig
composer.lock.rej
composer.phar
notindex.php
source/
vendor/
web/
因此,我的.htaccess是导致问题的原因。不是吗

感谢您的帮助


谢谢

php切换到不会显示错误的生产模式。您需要检查apache日志,并向我们展示产生了哪些错误,并用
angularjs
cause?@Kstro21标记,因为这是应用程序使用的,可能是错误背后的原因。考虑到这是一个问题,我不知道到底是什么导致了这场灾难problem@JasonRoman由于某些原因,日志文件a没有更新,我看到了apache和app/logs,而dev.log发布了一些关于使用已定价类的警告。没有发布新错误。您在哪里检查日志文件?比如/var/log/apache2?应该有一些错误记录
# Use the front controller as index file. It serves as a fallback solution when
# every other rewrite/redirect fails (e.g. in an aliased environment without
# mod_rewrite). Additionally, this reduces the matching process for the
# start page (path "/") because otherwise Apache will apply the rewriting rules
# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).
DirectoryIndex app.php

# By default, Apache does not evaluate symbolic links if you did not enable this
# feature in your server configuration. Uncomment the following line if you
# install assets as symlinks or if you experience problems related to symlinks
# when compiling LESS/Sass/CoffeScript assets.
# Options FollowSymlinks

# Disabling MultiViews prevents unwanted negotiation, e.g. "/app" should not resolve
# to the front controller "/app.php" but be rewritten to "/app.php/app".
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    # Determine the RewriteBase automatically and set it as environment variable.
    # If you are using Apache aliases to do mass virtual hosting or installed the
    # project in a subdirectory, the base path will be prepended to allow proper
    # resolution of the app.php file and to redirect to the correct URI. It will
    # work in environments without path prefix as well, providing a safe, one-size
    # fits all solution. But as you do not need it in this case, you can comment
    # the following 2 lines to eliminate the overhead.
    RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
    RewriteRule ^(.*) - [E=BASE:%1]

    # Sets the HTTP_AUTHORIZATION header removed by apache
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect to URI without front controller to prevent duplicate content
    # (with and without `/app.php`). Only do this redirect on the initial
    # rewrite by Apache and not on subsequent cycles. Otherwise we would get an
    # endless redirect loop (request -> rewrite to front controller ->
    # redirect -> request -> ...).
    # So in case you get a "too many redirects" error or you always get redirected
    # to the start page because your Apache does not expose the REDIRECT_STATUS
    # environment variable, you have 2 choices:
    # - disable this feature by commenting the following 2 lines or
    # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
    #   following RewriteCond (best solution)
    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]

    # If the requested filename exists, simply serve it.
    # We only want to let Apache serve files and not directories.
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule .? - [L]

    # Rewrite all other queries to the front controller.
    RewriteRule .? %{ENV:BASE}/app.php [L]
</IfModule>

<IfModule !mod_rewrite.c>
    <IfModule mod_alias.c>
        # When mod_rewrite is not available, we instruct a temporary redirect of
        # the start page 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>
[Sat Feb 13 05:47:28 2016] [error] [client 27.251.209.122] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Sat Feb 13 05:47:29 2016] [error] [client 27.251.209.122] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://website.com/
[Sat Feb 13 05:47:29 2016] [error] [client 27.251.209.122] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://website.com/ the limit if necessary.
[Sat Feb 13 05:53:06 2016] [error] [client 27.251.209.122] SoftException in Application.cpp:355: UID of script "/home/website/public_html/web/app.php" is smaller than min_uid
[Sat Feb 13 05:53:06 2016] [error] [client 27.251.209.122] Premature end of script headers: app.php
.git/
.gitignore
LICENSE
README.md
UPGRADE-2.2.md
UPGRADE-2.3.md
UPGRADE-2.4.md
UPGRADE-2.8.md
UPGRADE.md
bin/
cgi-bin/
components/
composer.json
composer.lock
composer.lock.orig
composer.lock.rej
composer.phar
notindex.php
source/
vendor/
web/