开发者

Why does symlink create an unnecessary "folder"?

开发者 https://www.devze.com 2023-01-14 14:15 出处:网络
Say the root folder on my server is /home/bong/www/, so mydomain.com will serve up index.php from /home/bong/www/.

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 c开发者_如何转开发reated 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?


I'm betting that www already existed, so when you created the link, it placed it inside the directory that was already there. Solution: delete www then create the link again.

0

精彩评论

暂无评论...
验证码 换一张
取 消