【发布时间】: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”并告诉我们错误在说什么