将 Symfony1 项目部署到带有 Ubuntu 14.04 的 Linode 时会显示空白屏幕


Deploying Symfony1 project to a Linode with Ubuntu 14.04 shows blank screen

我有一个有效的Symfony 1.4项目,托管在Linode VPS和Ubuntu 12.04中。出于某些原因,我必须将我的 Ubuntu 12.04 升级到 Ubuntu/Trusty64 14.04。当我上传我的symfony 1.4时,它向我显示空白屏幕,我已经通过在生产中运行php symfony cc来清除缓存。我刚刚复制了旧的 Apache2 站点启用配置和适用于 Ubuntu 12.04 的 .htaccess

sites-available/mysite.conf

<VirtualHost _default_:80>
  DocumentRoot /var/www/mysite/web 
</VirtualHost>

这也是.htaccesss

Options +FollowSymLinks +ExecCGI
<IfModule mod_rewrite.c>
RewriteEngine On
# uncomment the following line, if you are having trouble
# getting no_script_name to work
#RewriteBase /
# we skip all files with .something
#RewriteCond %{REQUEST_URI} '..+$
#RewriteCond %{REQUEST_URI} !'.html$
#RewriteRule .* - [L]
# we check if the .html version is here (caching)
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
# no, so we redirect to our front web controller
RewriteRule ^(.*)$ index.php [QSA,L]

这显示了我何时尝试谷歌的检查元素

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

知道如何解决这个问题吗?

您可能忘记启用 apache2 重写模块

sudo a2enmod rewrite
sudo service apache2 restart

希望对你有帮助