【问题标题】:Symfony, I have an error 500 when I put my site into production on the host 1and1Symfony,当我在主机 1and1 上将网站投入生产时出现错误 500
【发布时间】:2020-03-20 15:27:54
【问题描述】:

我正在将我的 Symfony 5 网站的第一个版本投入生产,但出现错误 500。我在 /public 中放置了一个 .htaccess 文件。我在主机 1 和 1 上。 对于我的.htaccess 文件,我使用了这个:https://github.com/symfony/symfony-standard/blob/3.3/web/.htaccess

这是我在日志文件最后几行的内容:

[2020-03-17T23:16:12.375704+01:00] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2020-03-18T00:23:05.456699+01:00] console.ERROR: Error thrown while running command "assets:install web". Message: "The target directory "web" does not exist." {"exception":"[object] (Symfony\\Component\\Console\\Exception\\InvalidArgumentException(code: 0): The target directory \"web\" does not exist. at C:\\xampp\\htdocs\\waloude\\vendor\\symfony\\framework-bundle\\Command\\AssetsInstallCommand.php:108)","command":"assets:install web","message":"The target directory \"web\" does not exist."} []
[2020-03-18T00:23:05.484563+01:00] console.DEBUG: Command "assets:install web" exited with code "1" {"command":"assets:install web","code":1} []

感谢您的帮助

【问题讨论】:

  • 查看日志文件中的内容,或者在 .env 文件中将环境更改为“env”并告诉我们错误在说什么

标签: php .htaccess symfony


【解决方案1】:

错误消息说您无法运行命令 assets:install web 因为文件夹 web 不存在。 创造了它。

【讨论】:

  • 我在哪里创建 web 文件夹?
猜你喜欢
  • 2021-11-06
  • 2020-09-05
  • 2019-09-14
  • 1970-01-01
  • 1970-01-01
  • 2014-09-05
  • 1970-01-01
  • 1970-01-01
  • 2015-06-16
相关资源
最近更新 更多