Capistrano:如何删除符号链接“当前”;而是使用: {deploy_to} 来访问已部署的文件
嘿, 我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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 ofreleases
.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.