Capistrano:如何删除符号链接“当前”;而是使用: {deploy_to} 来访问已部署的文件

发布于 2024-10-21 03:48:36 字数 350 浏览 5 评论 0原文

嘿, 我正在使用 Capistrano 部署我的 PHP 应用程序。
现在,我注意到这里有一件奇怪的事情(或者也许这是我不明白的事情)。
Capistrano 将应用程序部署到 releases 文件夹,然后使用符号链接 current 指向最新版本。
现在,当我访问这些文件时,我必须像这样访问它们:http://example.com/current/
有没有办法,我可以告诉 capistrano (或使其工作),以便我可以使用: http://example.com/ 来访问这些已部署的文件?

问候
尼基尔·古普塔.

Hey,
I am using Capistrano to deploy my PHP applications.
Now, I notice a strange thing here (or maybe this is something I do not understand).
Capistrano deploys application to releases folder and then, symlinks current to point to latest release.
Now, when I access these files, I have to access them like this: http://example.com/current/
Is there a way, I can tell capistrano (or make it work) so that I can rather use: http://example.com/ to access these deployed files?

Regards
Nikhil Gupta.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

以酷 2024-10-28 03:48:36

current 符号链接用于启用 capistrano 的内置功能以回滚到以前的版本 - 它只是更改符号链接以指向 releases 的不同子目录。

您有权访问服务器的主机配置吗?如果是这样,您可以将 DocumentRoot 更改为指向 /path/to/your/app/current

The current symlink is to enable capistrano's built-in functionality for rolling back to previous releases - it just changes the symlink to point to a different subdirectory of releases.

Do you have access to the server's host-configuration? If so, you could change the DocumentRoot to point to /path/to/your/app/current instead.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文