我在Linode VPS中使用Ubuntu 12.04进行了一个有效的Symfony 1.4项目。出于某些原因,我必须将我的Ubuntu 12.04升级到Ubuntu / Trusty64 14.04。当我上传我的symfony 1.4时,它显示我的空白屏幕,我已经通过在生产中运行php symfony cc清除了缓存。我只是复制了旧的Apache2站点启用配置和.htaccess,适用于Ubuntu 12.04
位点可用/ 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]
当我尝试Google的Inspect元素
时,这显示了我Failed to load resource: the server responded with a status of 500 (Internal Server Error)
知道如何解决这个问题吗?
答案 0 :(得分:1)
您可能忘记启用apache2重写模块
sudo a2enmod rewrite
sudo service apache2 restart
希望有所帮助