【问题标题】:Deploying Symfony1 project to a Linode with Ubuntu 14.04 shows blank screen使用 Ubuntu 14.04 将 Symfony1 项目部署到 Linode 显示空白屏幕
【发布时间】:2015-08-26 14:08:09
【问题描述】:

我有一个使用 Ubuntu 12.04 在 Linode VPS 中托管的 Symfony 1.4 项目。由于某些原因,我必须将我的 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]

当我尝试使用 Google 的 Inspect 元素时,这显示了我

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

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

【问题讨论】:

    标签: php .htaccess symfony-1.4 ubuntu-14.04 linode


    【解决方案1】:

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

    sudo a2enmod rewrite
    sudo service apache2 restart
    

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-07-28
      相关资源
      最近更新 更多