为什么符号链接会创建不必要的“文件夹”?
假设我的服务器上的根文件夹是 /home/bong/www/,那么 mydomain.com 将从 /home/bong/www/ 提供 index.php。
然后我克隆了一个 hg 存储库并将其放置在 /home/bong/hg/hgrepo/ 中。
当我在 /home/bong/ 上时,我创建了如下符号链接,以便访问 mydomain.com 将提供 hg/hgrepo 目录中的内容:
ln -s hg/hgrepo www
当我进入 www 时,我看到 hgrepo -> 。 hg/hgrepo
问题是当我访问 mydomain.com 时,它仍然不起作用......但 mydomain.com/hgrepo 可以。
我做错了什么?
Say the root folder on my server is /home/bong/www/, so mydomain.com will serve up index.php from /home/bong/www/.
Then I cloned an hg repository and placed it at /home/bong/hg/hgrepo/.
When I am on /home/bong/ I created a symlink as follow so that going to mydomain.com will serve up content from the hg/hgrepo directory:
ln -s hg/hgrepo www
When I go into www, I see hgrepo -> hg/hgrepo
Problem is then when i go to mydomain.com, it still doesn't work ... but mydomain.com/hgrepo does.
What did I do wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我敢打赌
www
已经存在,因此当您创建链接时,它会将其放在已经存在的目录中。解决方案:删除www
,然后重新创建链接。I'm betting that
www
already existed, so when you created the link, it placed it inside the directory that was already there. Solution: deletewww
then create the link again.